1
1
define ( [
2
2
'utils/helpers' ,
3
+ 'utils/css' ,
3
4
'events/events' ,
4
5
'utils/scriptloader' ,
5
6
'playlist/loader' ,
6
7
'embed/config' ,
8
+ 'plugins/plugins' ,
7
9
'controller/player' ,
8
10
'underscore'
9
- ] , function ( utils , events , scriptloader , PlaylistLoader , EmbedConfig , Html5Player , _ ) {
11
+ ] , function ( utils , cssUtils , events , scriptloader , PlaylistLoader , EmbedConfig , plugins , Html5Player , _ ) {
10
12
11
- jwplayer . vid = document . createElement ( 'video' ) ;
13
+ var _css = cssUtils . css ;
12
14
13
15
var Embed = function ( playerApi ) {
14
16
@@ -18,7 +20,7 @@ define([
18
20
_height = _config . height ,
19
21
_errorText = 'Error loading player: ' ,
20
22
_oldContainer = document . getElementById ( playerApi . id ) ,
21
- _pluginloader = jwplayer . plugins . loadPlugins ( playerApi . id , _config . plugins ) ,
23
+ _pluginloader = plugins . loadPlugins ( playerApi . id , _config . plugins ) ,
22
24
_loader ,
23
25
_playlistLoading = false ,
24
26
_errorOccurred = false ,
@@ -111,7 +113,7 @@ define([
111
113
utils . emptyElement ( _container ) ;
112
114
113
115
// Volume option is tricky to remove, since it needs to be in the HTML5 player model.
114
- var playerConfigCopy = jwplayer . utils . extend ( { } , pluginConfigCopy ) ;
116
+ var playerConfigCopy = utils . extend ( { } , pluginConfigCopy ) ;
115
117
delete playerConfigCopy . volume ;
116
118
var html5player = new Html5Player ( playerConfigCopy ) ;
117
119
playerApi . setPlayer ( html5player , 'html5' ) ;
@@ -199,10 +201,10 @@ define([
199
201
}
200
202
201
203
function _insertCSS ( ) {
202
- utils . css ( 'object.jwswf, .jwplayer:focus' , {
204
+ _css ( 'object.jwswf, .jwplayer:focus' , {
203
205
outline : 'none'
204
206
} ) ;
205
- utils . css ( '.jw-tab-focus:focus' , {
207
+ _css ( '.jw-tab-focus:focus' , {
206
208
outline : 'solid 2px #0B7EF4'
207
209
} ) ;
208
210
}
@@ -233,4 +235,4 @@ define([
233
235
234
236
return Embed ;
235
237
236
- } ) ( jwplayer ) ;
238
+ } ) ;
0 commit comments