VP-177: Restructure the VideoPlayer options to separate the video source and captions from the model

Metadata

Source
VP-177
Type
Bug
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Anastasia Cheetham
Created
2012-02-16T17:00:32.701-0500
Updated
2013-01-28T09:25:24.510-0500
Versions
N/A
Fixed Versions
N/A
Component
N/A

Description

Based on a discussion in the channel
http://wiki.fluidproject.org/display/fluid/fluid-work+IRC+Logs-2012-02-16 starting around [14:58:11 CST(-0600)]
we decided to separate the video source and captions specifications from the VideoPlayer model.

The new form will look something like:

var vp = fluid.videoPlayer(".videoPlayer", {
video:
sources: [{
src: "ReorganizeFuture.mp4",
type: "video/mp4"
},
{
src: "ReorganizeFuture.webm",
type: "video/webm"

}],
captions: [{
src: "ReorganizeFuture.en.vtt",
type: "text/vtt",
srclang: "en",
label: "English Subtitles",
kind: "subtitles"
},
{
src: "ReorganizeFuture.fr.vtt",
type: "text/vtt",
srclang: "fr",
label: "French Subtitles",
kind: "subtitles"
}],
transcripts: [...],
audioDescription: [...]
},
model: {
currentTracks: { // 0-based indices into the arrays in video
captions: [0, 2],
transcripts: [1],
audioDescriptions: [0]
},
displayCaptions: true,
displayTranscripts: false,
playAudioDescriptions: false,
fullscreen: true,
volume: 60
},
controls: "custom",
etc...
});

Comments

  • Michelle D'Souza commented 2012-03-07T17:04:06.849-0500

    Merged into demo branch at 0fc93b9cccef4bf35e817aae8ea303f7712724dd