/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { LiveDataObjectInitializeState, UserMeetingRole, } from "@microsoft/live-share"; import React from "react"; import { CoordinationWaitPoint, ExtendedMediaMetadata, IMediaPlayer, LiveMediaSession, MediaPlayerSynchronizer, MediaSessionCoordinatorSuspension, } from "@microsoft/live-share-media"; import { isExtendedMediaMetadata, isMediaElement, isRefObject } from "../utils"; import { useDynamicDDS } from "../shared-hooks"; import { IUseMediaSynchronizerResults } from "../types"; import { useFluidObjectsContext } from "../providers"; import { ActionContainerNotJoinedError, ActionLiveDataObjectUndefinedError, } from "../internal"; /** * React hook for using a Live Share media `MediaPlayerSynchronizer`. * * @remarks * Use this hook if you want to synchronize the playback position of a video or audio element during a Live Share session. * This hook can only be used in a child component of `` or ``. * * @param uniqueKey uniqueKey value for the `LiveMediaSession` DDS object used by `MediaPlayerSynchronizer`. * @param mediaPlayerElement React RefObject containing object/element conforming to IMediaPlayer interface, `IMediaPlayer` object, or string id for