microsoft / live-share-sdk

A framework for building collaborative Microsoft Teams and M365 experiences.
Other
94 stars 29 forks source link

Added option to prevent blocking of unexpected player events #737

Closed huntj88 closed 7 months ago

huntj88 commented 7 months ago

Introduces experimental @beta feature that enables synchronization of media based on all play and pause events, which may or may not be from user interaction.

/**
 * @beta
 * If true, pause and play actions will be ignored unless explicitly invoked from the corresponding play() and pause() functions.
 *
 * @remarks
 * True is considered non-beta. If you set to false, this is an experimental beta behavior.
 * Setting it to false may cause unintended side effects, such as local buffer events sending a pause event to remote clients.
 * While setting this to false may prevent the need to add custom media controls for frameworks like video.js, we encourage you to be mindful of this and test thoroughly before using this setting.
 */
public get blockUnexpectedPlayerEvents(): boolean