|
10 | 10 | |
11 | 11 | // Uses JW Player as fallback |
12 | 12 | // JW Player configuration options: |
13 | | - // http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player |
| 13 | + // http://support.jwplayer.com/customer/portal/articles/1413113-configuration-options-reference |
14 | 14 | // (NOTE: some options are not documented, e.g., volume) |
15 | | - // JW Player API reference: |
16 | | - // http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference |
| 15 | + // JW Player 6 API reference: |
| 16 | + // http://support.jwplayer.com/customer/portal/articles/1413089-javascript-api-reference |
17 | 17 |
|
18 | 18 | // YouTube Player API for iframe Embeds |
19 | 19 | https://developers.google.com/youtube/iframe_api_reference |
|
302 | 302 | // If NOT using JW Player, set to false. An error message will be displayed if browser can't play the media. |
303 | 303 | this.fallback = 'jw'; |
304 | 304 |
|
| 305 | + // fallback path - specify path to fallback player files |
| 306 | + this.fallbackPath = '../thirdparty/'; |
| 307 | + |
305 | 308 | // testFallback - set to true to force browser to use the fallback player (for testing) |
306 | 309 | // Note: JW Player does not support offline playback (a Flash restriction) |
307 | 310 | // Therefore testing must be performed on a web server |
308 | | - this.testFallback = true; |
| 311 | + this.testFallback = false; |
| 312 | + |
| 313 | + // translationPath - specify path to translation files |
| 314 | + this.translationPath = '../translations/'; |
309 | 315 |
|
310 | | - // loop - if true, will start again at top after last item in playlist has ended |
311 | | - // NOTE: This is not fully supported yet - needs work |
312 | | - this.loop = true; |
313 | | - |
314 | 316 | // lang - default language of the player |
315 | 317 | this.lang = 'en'; |
316 | 318 |
|
317 | 319 | // forceLang - set to true to force player to use default player language |
318 | 320 | // set to false to reset this.lang to language of the web page or user's browser, |
319 | 321 | // if either is detectable and if a matching translation file is available |
320 | 322 | this.forceLang = false; |
321 | | - |
322 | | - // translationPath - specify path to translation files |
323 | | - this.translationPath = '../translations/'; |
324 | | - |
325 | | - // fallback path - specify path to fallback player files |
326 | | - this.fallbackPath = '../thirdparty/'; |
327 | | - |
| 323 | + |
| 324 | + // loop - if true, will start again at top after last item in playlist has ended |
| 325 | + // NOTE: This is not fully supported yet - needs work |
| 326 | + this.loop = true; |
| 327 | + |
328 | 328 | // lyricsMode - line breaks in WebVTT caption file are always supported in captions |
329 | 329 | // but they're removed by default form transcripts in order to form a more seamless reading experience |
330 | 330 | // Set lyricsMode to true to add line breaks between captions, and within captions if there are "\n" |
|
661 | 661 | $.each(thisObj.$sources, function (ii, source) { |
662 | 662 | sources.push({file: $(source).attr('src')}); |
663 | 663 | }); |
664 | | - |
| 664 | + |
| 665 | + var flashplayer = thisObj.fallbackPath + 'jwplayer.flash.swf'; |
| 666 | + // var flashplayer = '../thirdparty/jwplayer.flash.swf'; |
| 667 | + var html5player = thisObj.fallbackPath + 'jwplayer.html5.js'; |
| 668 | + // var html5player = '../thirdparty/jwplayer.html5.js'; |
| 669 | + |
665 | 670 | if (thisObj.mediaType === 'video') { |
666 | 671 | thisObj.jwPlayer = jwplayer(thisObj.jwId).setup({ |
667 | 672 | playlist: [{ |
668 | 673 | sources: sources |
669 | 674 | }], |
670 | | - flashplayer: thisObj.fallbackPath + 'jwplayer.flash.swf', |
671 | | - html5player: thisObj.fallbackPath + 'jwplayer.html5.js', |
| 675 | + flashplayer: flashplayer, |
| 676 | + html5player: html5player, |
672 | 677 | image: thisObj.$media.attr('poster'), |
673 | 678 | controls: false, |
674 | 679 | volume: thisObj.defaultVolume * 100, |
|
684 | 689 | playlist: [{ |
685 | 690 | sources: sources |
686 | 691 | }], |
687 | | - flashplayer: thisObj.fallbackPath + 'jwplayer.flash.swf', |
688 | | - html5player: thisObj.fallbackPath + 'jwplayer.html5.js', |
| 692 | + flashplayer: flashplayer, |
| 693 | + html5player: html5player, |
689 | 694 | controls: false, |
690 | 695 | volume: this.defaultVolume * 100, |
691 | 696 | height: jwHeight, |
692 | 697 | fallback: false, |
693 | 698 | primary: 'flash' |
694 | 699 | }); |
695 | 700 | } |
696 | | - |
697 | 701 | // remove the media element - we're done with it |
698 | 702 | // keeping it would cause too many potential problems with HTML5 & JW event listeners both firing |
699 | 703 | thisObj.$media.remove(); |
|
2330 | 2334 | 'name': radioName, |
2331 | 2335 | 'id': radioId |
2332 | 2336 | }); |
2333 | | - if (track.default) { |
| 2337 | + if (track.def) { |
2334 | 2338 | trackButton.attr('checked','checked'); |
2335 | 2339 | hasDefault = true; |
2336 | 2340 | } |
|
3188 | 3192 | 'cues': cues, |
3189 | 3193 | 'language': trackLang, |
3190 | 3194 | 'label': trackLabel, |
3191 | | - 'default': isDefaultTrack |
| 3195 | + 'def': isDefaultTrack |
3192 | 3196 | }); |
3193 | 3197 | if (this.includeTranscript) { |
3194 | 3198 | if (isDefaultTrack) { |
|
3208 | 3212 | 'cues': cues, |
3209 | 3213 | 'language': trackLang, |
3210 | 3214 | 'label': trackLabel, |
3211 | | - 'default': isDefaultTrack |
| 3215 | + 'def': isDefaultTrack |
3212 | 3216 | }); |
3213 | 3217 | if (this.includeTranscript) { |
3214 | 3218 | if (isDefaultTrack) { |
|
3227 | 3231 | 'cues': cues, |
3228 | 3232 | 'language': trackLang, |
3229 | 3233 | 'label': trackLabel, |
3230 | | - 'default': isDefaultTrack |
| 3234 | + 'def': isDefaultTrack |
3231 | 3235 | }); |
3232 | 3236 | if (this.includeTranscript) { |
3233 | 3237 | if (isDefaultTrack) { |
|
0 commit comments