diff --git a/player/videojs.coffee b/player/videojs.coffee
index 24f38a5c..e136e763 100644
--- a/player/videojs.coffee
+++ b/player/videojs.coffee
@@ -32,14 +32,15 @@ sortSources = (sources) ->
return sourceOrder.concat(flvOrder).map((source) ->
type: source.contentType
src: source.link
- quality: source.quality
+ res: source.quality
+ label: getSourceLabel(source)
)
getSourceLabel = (source) ->
- if source.quality is 'auto'
+ if source.res is 'auto'
return 'auto'
else
- return "#{source.quality}p #{source.type.split('/')[1]}"
+ return "#{source.quality}p #{source.contentType.split('/')[1]}"
waitUntilDefined(window, 'videojs', =>
videojs.options.flash.swf = '/video-js.swf'
@@ -74,14 +75,6 @@ window.VideoJSPlayer = class VideoJSPlayer extends Player
return
@sourceIdx = 0
- @sources.forEach((source) ->
- $('').attr(
- src: source.src
- type: source.type
- res: source.quality
- label: getSourceLabel(source)
- ).appendTo(video)
- )
# TODO: Refactor VideoJSPlayer to use a preLoad()/load()/postLoad() pattern
# VideoJSPlayer should provide the core functionality and logic for specific
@@ -112,17 +105,22 @@ window.VideoJSPlayer = class VideoJSPlayer extends Player
)
@player = videojs(video[0],
- autoplay: true,
+ # https://github.com/Dash-Industry-Forum/dash.js/issues/2184
+ autoplay: @sources[0].type != 'application/dash+xml',
controls: true,
plugins:
videoJsResolutionSwitcher:
- default: @sources[0].quality
+ default: @sources[0].res
)
@player.ready(=>
+ # Have to use updateSrc instead of