-
Notifications
You must be signed in to change notification settings - Fork 5
Storing Player States
Dananji Withana edited this page Nov 18, 2024
·
1 revision
Ramp uses browser's Local Storage to store some of player related states, to make the playback experience consistent across tabs, and user sessions. This feature was introduced in @samvera/[email protected].
The states Ramp keeps in Local Storage are as follows;
- mute/unmute: a Boolean value to indicate whether the player is muted or not. This value is set to
false
by default, which sets the player to unmute status. - selected source quality: a String value for the label of the source quality selected in the quality selector menu in the player's control bar. This value is set to
null
by default, which allows Ramp to select eitherauto
source or the first source available in the Canvas. - volume: a Number between 0 and 1, to indicate the volume level of the player on page. This value is set to 1 by default, which sets the volume to maximum value.
- captions status: a Boolean value to indicate whether captions are turned on/off in the player. This value is set to
true
by default, which turns on the captions. (added in@samvera/[email protected]
)
These values are changed as the user interacts with the player and stored in Local Storage in the browser.