equal
deleted
inserted
replaced
13 will contain the video. |
13 will contain the video. |
14 */ |
14 */ |
15 case "html5": |
15 case "html5": |
16 var tmpId = Popcorn.guid("video"); |
16 var tmpId = Popcorn.guid("video"); |
17 IriSP.jQuery("#" + containerDiv).append("<video src='" + options.file + "' id='" + tmpId + "'></video>"); |
17 IriSP.jQuery("#" + containerDiv).append("<video src='" + options.file + "' id='" + tmpId + "'></video>"); |
18 pop = Popcorn("#" + tmpId); |
18 pop = Popcorn("#" + tmpId).mediafragment({start : 0}); |
19 break; |
19 break; |
20 |
20 |
21 case "jwplayer": |
21 case "jwplayer": |
22 var opts = IriSP.jQuery.extend({}, options); |
22 var opts = IriSP.jQuery.extend({}, options); |
23 delete opts.container; |
23 delete opts.container; |
24 pop = Popcorn.jwplayer("#" + containerDiv, "", opts); |
24 pop = Popcorn.jwplayer("#" + containerDiv, "", opts).mediafragment({start : 0}); |
25 break; |
25 break; |
26 |
26 |
27 case "youtube": |
27 case "youtube": |
28 var opts = IriSP.jQuery.extend({}, options); |
28 var opts = IriSP.jQuery.extend({}, options); |
29 delete opts.container; |
29 delete opts.container; |
32 templ = "width: {{width}}px; height: {{height}}px;"; |
32 templ = "width: {{width}}px; height: {{height}}px;"; |
33 var str = Mustache.to_html(templ, {width: opts.width, height: opts.height}); |
33 var str = Mustache.to_html(templ, {width: opts.width, height: opts.height}); |
34 // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div. |
34 // Popcorn.youtube wants us to specify the size of the player in the style attribute of its container div. |
35 IriSP.jQuery("#" + containerDiv).attr("style", str); |
35 IriSP.jQuery("#" + containerDiv).attr("style", str); |
36 |
36 |
37 pop = Popcorn.youtube("#" + containerDiv, opts.video, opts); |
37 pop = Popcorn.youtube("#" + containerDiv, opts.video, opts).mediafragment({start : 0}); |
38 break; |
38 break; |
39 |
39 |
40 default: |
40 default: |
41 pop = undefined; |
41 pop = undefined; |
42 }; |
42 }; |