Configure player method #93
Labels
flag: good first issue
This might be a relatively easy issue; good for new contributors
status: archived
Archived and locked; will not be updated
type: code health
A code health issue
type: enhancement
New feature or request
Milestone
It would be nice to have a generalized configure method on the player which accepts an object literal to specify values such as buffer size.
var mediaPlayer = new shaka.player.Player(videoElement);
mediaPlayer.setStreamBufferSize(120);
would become:
var mediaPlayer = new shaka.player.Player(videoElement);
mediaPlayer.configure({ streamBufferSize : 120 });
One significant advantage of doing this will be to reduce coupling to the specific player api methods. For example, if setStreamBufferSize was renamed to setBufferSize, the player would break whereas changing the name in the object literal will simply mean the values are ignored and playback would continue.
This would be helpful when A/B testing between player versions.
The text was updated successfully, but these errors were encountered: