@oat-sa/tao-core-ui 1.60.2 → 1.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +339 -339
- package/README.md +23 -18
- package/dist/actionbar.js +105 -105
- package/dist/adder.js +109 -109
- package/dist/animable/absorbable/absorbable.js +42 -42
- package/dist/animable/absorbable/css/absorb.css +7 -7
- package/dist/animable/absorbable/css/absorb.css.map +1 -1
- package/dist/animable/pulsable/css/pulse.css +7 -7
- package/dist/animable/pulsable/css/pulse.css.map +1 -1
- package/dist/animable/pulsable/pulsable.js +36 -36
- package/dist/areaBroker.js +51 -51
- package/dist/autocomplete/css/autocomplete.css +7 -7
- package/dist/autocomplete/css/autocomplete.css.map +1 -1
- package/dist/autocomplete.js +400 -400
- package/dist/autoscroll.js +22 -22
- package/dist/badge/badge.js +48 -48
- package/dist/badge/css/badge.css +7 -7
- package/dist/badge/css/badge.css.map +1 -1
- package/dist/breadcrumbs/css/breadcrumbs.css +7 -7
- package/dist/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/dist/breadcrumbs.js +70 -70
- package/dist/btngrouper.js +64 -64
- package/dist/bulkActionPopup/css/bulkActionPopup.css +7 -7
- package/dist/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/dist/bulkActionPopup.js +104 -104
- package/dist/button.js +102 -102
- package/dist/calculator/css/calculator.css +10 -10
- package/dist/calculator/css/calculator.css.map +1 -1
- package/dist/calculator.js +51 -51
- package/dist/cascadingComboBox.js +47 -47
- package/dist/ckeditor/ckConfigurator.js +48 -48
- package/dist/ckeditor/dtdHandler.js +110 -110
- package/dist/class/css/selector.css +7 -7
- package/dist/class/css/selector.css.map +1 -1
- package/dist/class/selector.js +111 -111
- package/dist/component/alignable.js +81 -81
- package/dist/component/containable.js +37 -37
- package/dist/component/css/components.css +7 -7
- package/dist/component/css/components.css.map +1 -1
- package/dist/component/css/windowComponent.css +7 -7
- package/dist/component/css/windowComponent.css.map +1 -1
- package/dist/component/draggable.js +25 -25
- package/dist/component/placeable.js +70 -70
- package/dist/component/resizable.js +61 -61
- package/dist/component/stackable.js +20 -20
- package/dist/component/windowed.js +59 -59
- package/dist/component.js +153 -153
- package/dist/container.js +76 -76
- package/dist/contextualPopup/css/contextualPopup.css +7 -7
- package/dist/contextualPopup/css/contextualPopup.css.map +1 -1
- package/dist/contextualPopup.js +113 -113
- package/dist/dashboard/css/dashboard.css +7 -7
- package/dist/dashboard/css/dashboard.css.map +1 -1
- package/dist/dashboard.js +75 -75
- package/dist/datalist/css/datalist.css +7 -7
- package/dist/datalist/css/datalist.css.map +1 -1
- package/dist/datalist.js +160 -160
- package/dist/datatable/css/datatable.css +11 -7
- package/dist/datatable/css/datatable.css.map +1 -1
- package/dist/datatable/filterStrategy/filterStrategy.js +27 -27
- package/dist/datatable/filterStrategy/multiple.js +25 -25
- package/dist/datatable/filterStrategy/single.js +25 -25
- package/dist/datatable.js +464 -431
- package/dist/dateRange/css/dateRange.css +7 -7
- package/dist/dateRange/css/dateRange.css.map +1 -1
- package/dist/dateRange/dateRange.js +110 -110
- package/dist/datetime/css/picker.css +7 -7
- package/dist/datetime/css/picker.css.map +1 -1
- package/dist/datetime/picker.js +174 -174
- package/dist/deleter.js +92 -92
- package/dist/destination/css/selector.css +7 -7
- package/dist/destination/css/selector.css.map +1 -1
- package/dist/destination/selector.js +65 -65
- package/dist/dialog/alert.js +26 -26
- package/dist/dialog/confirm.js +27 -27
- package/dist/dialog/confirmDelete.js +44 -44
- package/dist/dialog.js +156 -156
- package/dist/disabler.js +90 -90
- package/dist/documentViewer/css/documentViewer.css +7 -7
- package/dist/documentViewer/css/documentViewer.css.map +1 -1
- package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +43 -43
- package/dist/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +25 -25
- package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +133 -133
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +102 -102
- package/dist/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +52 -52
- package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +125 -125
- package/dist/documentViewer/providers/pdfViewer/pdfjs/textManager.js +67 -67
- package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +94 -94
- package/dist/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +111 -111
- package/dist/documentViewer/providers/pdfViewer.js +42 -42
- package/dist/documentViewer/viewerFactory.js +71 -71
- package/dist/documentViewer.js +99 -99
- package/dist/dropdown/css/dropdown.css +7 -7
- package/dist/dropdown/css/dropdown.css.map +1 -1
- package/dist/dropdown.js +97 -97
- package/dist/durationer.js +58 -58
- package/dist/dynamicComponent/css/dynamicComponent.css +7 -7
- package/dist/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/dist/dynamicComponent.js +116 -116
- package/dist/feedback.js +97 -97
- package/dist/figure/FigureStateActive.js +117 -117
- package/dist/filesender.js +26 -26
- package/dist/filter.js +47 -47
- package/dist/form/css/dropdownForm.css +7 -7
- package/dist/form/css/dropdownForm.css.map +1 -1
- package/dist/form/css/form.css +7 -7
- package/dist/form/css/form.css.map +1 -1
- package/dist/form/dropdownForm.js +112 -112
- package/dist/form/form.js +245 -245
- package/dist/form/simpleForm.js +71 -71
- package/dist/form/validator/css/validator.css +7 -7
- package/dist/form/validator/css/validator.css.map +1 -1
- package/dist/form/validator/renderer.js +65 -65
- package/dist/form/validator/validator.js +87 -87
- package/dist/form/widget/css/widget.css +7 -7
- package/dist/form/widget/css/widget.css.map +1 -1
- package/dist/form/widget/definitions.js +24 -24
- package/dist/form/widget/loader.js +16 -16
- package/dist/form/widget/providers/checkBox.js +75 -75
- package/dist/form/widget/providers/comboBox.js +59 -59
- package/dist/form/widget/providers/default.js +35 -35
- package/dist/form/widget/providers/hidden.js +50 -50
- package/dist/form/widget/providers/hiddenBox.js +71 -71
- package/dist/form/widget/providers/radioBox.js +70 -70
- package/dist/form/widget/providers/textArea.js +48 -48
- package/dist/form/widget/providers/textBox.js +34 -34
- package/dist/form/widget/widget.js +154 -154
- package/dist/form.js +10 -10
- package/dist/formValidator/formValidator.js +61 -61
- package/dist/formValidator/highlighters/highlighter.js +41 -41
- package/dist/formValidator/highlighters/message.js +29 -29
- package/dist/formValidator/highlighters/tooltip.js +32 -32
- package/dist/generis/form/css/form.css +7 -7
- package/dist/generis/form/css/form.css.map +1 -1
- package/dist/generis/form/form.js +86 -86
- package/dist/generis/validator/css/validator.css +7 -7
- package/dist/generis/validator/css/validator.css.map +1 -1
- package/dist/generis/validator/validator.js +51 -51
- package/dist/generis/widget/checkBox/checkBox.js +52 -52
- package/dist/generis/widget/comboBox/comboBox.js +45 -45
- package/dist/generis/widget/css/widget.css +7 -7
- package/dist/generis/widget/css/widget.css.map +1 -1
- package/dist/generis/widget/hiddenBox/hiddenBox.js +53 -53
- package/dist/generis/widget/loader.js +20 -20
- package/dist/generis/widget/textBox/textBox.js +40 -40
- package/dist/generis/widget/widget.js +60 -60
- package/dist/groupedComboBox.js +49 -49
- package/dist/groupvalidator.js +19 -19
- package/dist/hider.js +41 -41
- package/dist/highlighter.js +262 -262
- package/dist/image/ImgStateActive/extractLabel.js +20 -20
- package/dist/image/ImgStateActive/helper.js +16 -16
- package/dist/image/ImgStateActive/initHelper.js +85 -85
- package/dist/image/ImgStateActive/initMediaEditor.js +48 -48
- package/dist/image/ImgStateActive/mediaSizer.js +32 -32
- package/dist/image/ImgStateActive.js +104 -104
- package/dist/incrementer.js +58 -58
- package/dist/inplacer.js +87 -87
- package/dist/interactUtils.js +42 -42
- package/dist/itemButtonList/css/item-button-list.css +23 -23
- package/dist/itemButtonList/css/item-button-list.css.map +1 -1
- package/dist/itemButtonList.js +115 -115
- package/dist/keyNavigation/navigableDomElement.js +76 -76
- package/dist/keyNavigation/navigator.js +158 -158
- package/dist/listbox/css/listbox.css +7 -7
- package/dist/listbox/css/listbox.css.map +1 -1
- package/dist/listbox.js +97 -97
- package/dist/liststyler.js +57 -57
- package/dist/loadingButton/css/button.css +7 -7
- package/dist/loadingButton/css/button.css.map +1 -1
- package/dist/loadingButton/loadingButton.js +48 -48
- package/dist/lock.js +125 -125
- package/dist/login/login.js +100 -100
- package/dist/maths/calculator/basicCalculator.js +63 -63
- package/dist/maths/calculator/calculatorComponent.js +29 -29
- package/dist/maths/calculator/core/areaBroker.js +25 -25
- package/dist/maths/calculator/core/board.js +313 -313
- package/dist/maths/calculator/core/expression.js +111 -111
- package/dist/maths/calculator/core/labels.js +29 -29
- package/dist/maths/calculator/core/plugin.js +19 -19
- package/dist/maths/calculator/core/terms.js +26 -26
- package/dist/maths/calculator/core/tokenizer.js +98 -98
- package/dist/maths/calculator/core/tokens.js +59 -59
- package/dist/maths/calculator/css/calculator.css +7 -7
- package/dist/maths/calculator/css/calculator.css.map +1 -1
- package/dist/maths/calculator/defaultCalculator.js +23 -23
- package/dist/maths/calculator/plugins/core/degrad.js +22 -22
- package/dist/maths/calculator/plugins/core/history.js +45 -45
- package/dist/maths/calculator/plugins/core/remind.js +22 -22
- package/dist/maths/calculator/plugins/core/stepNavigation.js +31 -31
- package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +61 -61
- package/dist/maths/calculator/plugins/modifiers/pow10.js +35 -35
- package/dist/maths/calculator/plugins/modifiers/sign.js +90 -90
- package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +60 -60
- package/dist/maths/calculator/pluginsLoader.js +21 -21
- package/dist/maths/calculator/scientificCalculator.js +91 -91
- package/dist/mediaEditor/mediaEditorComponent.js +64 -64
- package/dist/mediaEditor/plugins/mediaAlignment/helper.js +16 -16
- package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +60 -60
- package/dist/mediaEditor/plugins/mediaAlignment/style.css +7 -7
- package/dist/mediaEditor/plugins/mediaDimension/helper.js +70 -70
- package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +153 -153
- package/dist/mediaEditor/plugins/mediaDimension/style.css +141 -141
- package/dist/mediaplayer/css/player.css +7 -7
- package/dist/mediaplayer/css/player.css.map +1 -1
- package/dist/mediaplayer/players/html5.js +65 -65
- package/dist/mediaplayer/players/youtube.js +52 -52
- package/dist/mediaplayer/players.js +18 -18
- package/dist/mediaplayer/support.js +55 -55
- package/dist/mediaplayer/utils/reminder.js +100 -100
- package/dist/mediaplayer/utils/timeObserver.js +92 -92
- package/dist/mediaplayer/youtubeManager.js +35 -35
- package/dist/mediaplayer.js +460 -460
- package/dist/mediasizer.js +135 -135
- package/dist/modal.js +87 -87
- package/dist/movableComponent.js +35 -35
- package/dist/pageSizeSelector.js +44 -44
- package/dist/pageStatus.js +33 -33
- package/dist/pagination/css/pagination.css +7 -7
- package/dist/pagination/css/pagination.css.map +1 -1
- package/dist/pagination/paginationStrategy.js +23 -23
- package/dist/pagination/providers/pages.js +37 -37
- package/dist/pagination/providers/simple.js +35 -35
- package/dist/pagination.js +45 -45
- package/dist/previewer.js +67 -67
- package/dist/progressbar.js +58 -58
- package/dist/propertySelector/css/propertySelector.css +74 -0
- package/dist/propertySelector/css/propertySelector.css.map +1 -0
- package/dist/propertySelector/propertySelector.js +533 -0
- package/dist/report.js +86 -86
- package/dist/resource/css/selector.css +7 -7
- package/dist/resource/css/selector.css.map +1 -1
- package/dist/resource/filters.js +73 -73
- package/dist/resource/list.js +66 -66
- package/dist/resource/selectable.js +92 -92
- package/dist/resource/selector.js +195 -195
- package/dist/resource/tree.js +104 -104
- package/dist/resourcemgr/css/resourcemgr.css +7 -7
- package/dist/resourcemgr/css/resourcemgr.css.map +1 -1
- package/dist/resourcemgr/fileBrowser.js +88 -88
- package/dist/resourcemgr/fileSelector.js +58 -58
- package/dist/resourcemgr/util/updatePermissions.js +4 -4
- package/dist/resourcemgr.js +62 -62
- package/dist/scroller.js +26 -26
- package/dist/searchModal/advancedSearch.js +355 -161
- package/dist/searchModal/css/advancedSearch.css +7 -14
- package/dist/searchModal/css/advancedSearch.css.map +1 -1
- package/dist/searchModal/css/searchModal.css +29 -8
- package/dist/searchModal/css/searchModal.css.map +1 -1
- package/dist/searchModal.js +574 -190
- package/dist/selecter.js +6 -6
- package/dist/stacker.js +43 -43
- package/dist/switch/css/switch.css +7 -7
- package/dist/switch/css/switch.css.map +1 -1
- package/dist/switch/switch.js +75 -75
- package/dist/tableModel.js +33 -33
- package/dist/tabs/css/tabs.css +12 -12
- package/dist/tabs/css/tabs.css.map +1 -1
- package/dist/tabs.js +217 -217
- package/dist/taskQueue/css/taskQueue.css +7 -7
- package/dist/taskQueue/css/taskQueue.css.map +1 -1
- package/dist/taskQueue/status.js +72 -72
- package/dist/taskQueue/table.js +67 -67
- package/dist/taskQueue/taskQueue.js +18 -18
- package/dist/taskQueue/taskQueueModel.js +86 -86
- package/dist/taskQueue.js +47 -47
- package/dist/taskQueueButton/css/taskable.css +7 -7
- package/dist/taskQueueButton/css/taskable.css.map +1 -1
- package/dist/taskQueueButton/css/treeButton.css +7 -7
- package/dist/taskQueueButton/css/treeButton.css.map +1 -1
- package/dist/taskQueueButton/standardButton.js +39 -39
- package/dist/taskQueueButton/taskable.js +54 -54
- package/dist/taskQueueButton/treeButton.js +56 -56
- package/dist/themeLoader.js +75 -75
- package/dist/themes.js +84 -84
- package/dist/toggler.js +57 -57
- package/dist/tooltip.js +54 -54
- package/dist/tooltipster.js +17 -17
- package/dist/transformer.js +117 -117
- package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
- package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/dist/tristateCheckboxGroup.js +75 -75
- package/dist/uploader.js +158 -158
- package/dist/validator/validators.js +48 -48
- package/dist/validator.js +24 -24
- package/dist/waitForMedia.js +33 -33
- package/dist/waitingDialog/css/waitingDialog.css +7 -7
- package/dist/waitingDialog/css/waitingDialog.css.map +1 -1
- package/dist/waitingDialog/waitingDialog.js +54 -54
- package/package.json +108 -107
- package/scss/basic.scss +16 -16
- package/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +59 -59
- package/scss/ckeditor/skins/tao/scss/inc/_tao.scss +59 -59
- package/scss/font/tao/tao.svg +234 -234
- package/scss/inc/_base.scss +495 -495
- package/scss/inc/_bootstrap.scss +6 -6
- package/scss/inc/_buttons.scss +114 -114
- package/scss/inc/_colors.scss +93 -88
- package/scss/inc/_feedback.scss +150 -150
- package/scss/inc/_flex-grid.scss +15 -15
- package/scss/inc/_fonts.scss +4 -4
- package/scss/inc/_forms.scss +832 -832
- package/scss/inc/_functions.scss +283 -283
- package/scss/inc/_jquery.nouislider.scss +254 -254
- package/scss/inc/_normalize.scss +528 -528
- package/scss/inc/_report.scss +67 -67
- package/scss/inc/_secondary-properties.scss +89 -89
- package/scss/inc/_select2.scss +634 -634
- package/scss/inc/_toolbars.scss +155 -155
- package/scss/inc/_tooltip.scss +312 -312
- package/scss/inc/_variables.scss +21 -21
- package/scss/inc/base/_highlight.scss +5 -5
- package/scss/inc/base/_list-style.scss +58 -58
- package/scss/inc/base/_svg.scss +3 -3
- package/scss/inc/base/_table.scss +62 -62
- package/scss/inc/fonts/_source-sans-pro.scss +29 -29
- package/scss/inc/fonts/_tao-icon-classes.scss +226 -226
- package/scss/inc/fonts/_tao-icon-def.scss +12 -12
- package/scss/inc/fonts/_tao-icon-vars.scss +240 -240
- package/src/actionbar/tpl/main.tpl +8 -8
- package/src/actionbar.js +251 -251
- package/src/adder.js +250 -250
- package/src/animable/absorbable/absorbable.js +134 -134
- package/src/animable/absorbable/css/absorb.css +7 -7
- package/src/animable/absorbable/css/absorb.css.map +1 -1
- package/src/animable/absorbable/scss/absorb.scss +37 -37
- package/src/animable/pulsable/css/pulse.css +7 -7
- package/src/animable/pulsable/css/pulse.css.map +1 -1
- package/src/animable/pulsable/pulsable.js +90 -90
- package/src/animable/pulsable/scss/pulse.scss +22 -22
- package/src/areaBroker.js +160 -160
- package/src/autocomplete/css/autocomplete.css +7 -7
- package/src/autocomplete/css/autocomplete.css.map +1 -1
- package/src/autocomplete/scss/autocomplete.scss +37 -37
- package/src/autocomplete.js +1029 -1029
- package/src/autoscroll.js +57 -57
- package/src/badge/badge.js +119 -119
- package/src/badge/css/badge.css +7 -7
- package/src/badge/css/badge.css.map +1 -1
- package/src/badge/scss/badge.scss +92 -92
- package/src/badge/tpl/badge.tpl +4 -4
- package/src/breadcrumbs/css/breadcrumbs.css +7 -7
- package/src/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/src/breadcrumbs/scss/breadcrumbs.scss +52 -52
- package/src/breadcrumbs/tpl/breadcrumbs.tpl +20 -20
- package/src/breadcrumbs.js +99 -99
- package/src/btngrouper.js +213 -213
- package/src/bulkActionPopup/css/bulkActionPopup.css +7 -7
- package/src/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/src/bulkActionPopup/scss/bulkActionPopup.scss +63 -63
- package/src/bulkActionPopup/tpl/layout.tpl +76 -76
- package/src/bulkActionPopup/tpl/select.tpl +8 -8
- package/src/bulkActionPopup.js +274 -274
- package/src/button/tpl/button.tpl +4 -4
- package/src/button.js +135 -135
- package/src/calculator/css/calculator.css +10 -10
- package/src/calculator/css/calculator.css.map +1 -1
- package/src/calculator/scss/calculator.scss +139 -139
- package/src/calculator.js +188 -188
- package/src/cascadingComboBox.js +126 -126
- package/src/ckeditor/ckConfigurator.js +736 -736
- package/src/ckeditor/dtdHandler.js +1030 -1030
- package/src/class/css/selector.css +7 -7
- package/src/class/css/selector.css.map +1 -1
- package/src/class/scss/selector.scss +101 -101
- package/src/class/selector.js +329 -329
- package/src/class/tpl/listItem.tpl +9 -9
- package/src/class/tpl/selector.tpl +10 -10
- package/src/component/alignable.js +274 -274
- package/src/component/containable.js +122 -122
- package/src/component/css/components.css +7 -7
- package/src/component/css/components.css.map +1 -1
- package/src/component/css/windowComponent.css +7 -7
- package/src/component/css/windowComponent.css.map +1 -1
- package/src/component/draggable.js +104 -104
- package/src/component/placeable.js +233 -233
- package/src/component/resizable.js +195 -195
- package/src/component/scss/components.scss +507 -507
- package/src/component/scss/windowComponent.scss +62 -62
- package/src/component/stackable.js +67 -67
- package/src/component/tpl/window.tpl +7 -7
- package/src/component/windowed.js +206 -206
- package/src/component.js +401 -401
- package/src/container.js +200 -200
- package/src/contextualPopup/css/contextualPopup.css +7 -7
- package/src/contextualPopup/css/contextualPopup.css.map +1 -1
- package/src/contextualPopup/scss/contextualPopup.scss +78 -78
- package/src/contextualPopup/tpl/popup.tpl +10 -10
- package/src/contextualPopup.js +297 -297
- package/src/css/basic.css +103 -103
- package/src/css/basic.css.map +1 -1
- package/src/dashboard/css/dashboard.css +7 -7
- package/src/dashboard/css/dashboard.css.map +1 -1
- package/src/dashboard/scss/dashboard.scss +93 -93
- package/src/dashboard/tpl/dashboard.tpl +16 -16
- package/src/dashboard/tpl/dashboardMetricsList.tpl +15 -15
- package/src/dashboard.js +184 -184
- package/src/datalist/css/datalist.css +7 -7
- package/src/datalist/css/datalist.css.map +1 -1
- package/src/datalist/scss/datalist.scss +116 -116
- package/src/datalist/tpl/list.tpl +24 -24
- package/src/datalist/tpl/main.tpl +44 -44
- package/src/datalist.js +500 -500
- package/src/datatable/css/datatable.css +11 -7
- package/src/datatable/css/datatable.css.map +1 -1
- package/src/datatable/filterStrategy/filterStrategy.js +70 -70
- package/src/datatable/filterStrategy/multiple.js +126 -126
- package/src/datatable/filterStrategy/single.js +108 -108
- package/src/datatable/scss/datatable.scss +149 -146
- package/src/datatable/tpl/button.tpl +6 -6
- package/src/datatable/tpl/layout.tpl +158 -158
- package/src/datatable.js +1056 -1056
- package/src/dateRange/css/dateRange.css +7 -7
- package/src/dateRange/css/dateRange.css.map +1 -1
- package/src/dateRange/dateRange.js +341 -341
- package/src/dateRange/scss/dateRange.scss +7 -7
- package/src/dateRange/tpl/select.tpl +18 -18
- package/src/datetime/css/picker.css +7 -7
- package/src/datetime/css/picker.css.map +1 -1
- package/src/datetime/picker.js +576 -576
- package/src/datetime/scss/picker.scss +192 -192
- package/src/datetime/tpl/picker.tpl +18 -18
- package/src/deleter/undo.tpl +6 -6
- package/src/deleter.js +296 -296
- package/src/destination/css/selector.css +7 -7
- package/src/destination/css/selector.css.map +1 -1
- package/src/destination/scss/selector.scss +36 -36
- package/src/destination/selector.js +195 -195
- package/src/destination/tpl/selector.tpl +13 -13
- package/src/dialog/alert.js +70 -70
- package/src/dialog/confirm.js +85 -85
- package/src/dialog/confirmDelete.js +95 -95
- package/src/dialog/tpl/body.tpl +24 -24
- package/src/dialog/tpl/buttons.tpl +6 -6
- package/src/dialog/tpl/checkbox.tpl +5 -5
- package/src/dialog.js +517 -517
- package/src/disabler.js +230 -230
- package/src/documentViewer/css/documentViewer.css +7 -7
- package/src/documentViewer/css/documentViewer.css.map +1 -1
- package/src/documentViewer/providers/pdfViewer/fallback/viewer.js +69 -69
- package/src/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +41 -41
- package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.js +475 -475
- package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.tpl +20 -20
- package/src/documentViewer/providers/pdfViewer/pdfjs/match.tpl +1 -1
- package/src/documentViewer/providers/pdfViewer/pdfjs/page.tpl +4 -4
- package/src/documentViewer/providers/pdfViewer/pdfjs/pageView.js +318 -318
- package/src/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +167 -167
- package/src/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +451 -451
- package/src/documentViewer/providers/pdfViewer/pdfjs/textManager.js +252 -252
- package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.js +299 -299
- package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.tpl +16 -16
- package/src/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +351 -351
- package/src/documentViewer/providers/pdfViewer.js +93 -93
- package/src/documentViewer/scss/documentViewer.scss +184 -184
- package/src/documentViewer/viewerFactory.js +191 -191
- package/src/documentViewer.js +238 -238
- package/src/dropdown/css/dropdown.css +7 -7
- package/src/dropdown/css/dropdown.css.map +1 -1
- package/src/dropdown/scss/dropdown.scss +99 -99
- package/src/dropdown/tpl/dropdown.tpl +8 -8
- package/src/dropdown/tpl/list-item.tpl +4 -4
- package/src/dropdown.js +255 -255
- package/src/durationer.js +222 -222
- package/src/dynamicComponent/css/dynamicComponent.css +7 -7
- package/src/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/src/dynamicComponent/scss/dynamicComponent.scss +98 -98
- package/src/dynamicComponent/tpl/layout.tpl +17 -17
- package/src/dynamicComponent.js +554 -554
- package/src/feedback/feedback.tpl +7 -7
- package/src/feedback.js +295 -295
- package/src/figure/FigureStateActive.js +174 -174
- package/src/filesender.js +114 -114
- package/src/filter/template.tpl +5 -5
- package/src/filter.js +135 -135
- package/src/form/css/dropdownForm.css +7 -7
- package/src/form/css/dropdownForm.css.map +1 -1
- package/src/form/css/form.css +7 -7
- package/src/form/css/form.css.map +1 -1
- package/src/form/dropdownForm.js +281 -281
- package/src/form/form.js +688 -688
- package/src/form/scss/dropdownForm.scss +60 -60
- package/src/form/scss/form.scss +25 -25
- package/src/form/simpleForm.js +125 -125
- package/src/form/tpl/dropdownForm.tpl +4 -4
- package/src/form/tpl/form.tpl +7 -7
- package/src/form/validator/css/validator.css +7 -7
- package/src/form/validator/css/validator.css.map +1 -1
- package/src/form/validator/renderer.js +118 -118
- package/src/form/validator/scss/validator.scss +14 -14
- package/src/form/validator/tpl/message.tpl +1 -1
- package/src/form/validator/tpl/validator.tpl +1 -1
- package/src/form/validator/validator.js +220 -220
- package/src/form/widget/css/widget.css +7 -7
- package/src/form/widget/css/widget.css.map +1 -1
- package/src/form/widget/definitions.js +51 -51
- package/src/form/widget/loader.js +40 -40
- package/src/form/widget/providers/checkBox.js +138 -138
- package/src/form/widget/providers/comboBox.js +63 -63
- package/src/form/widget/providers/default.js +90 -90
- package/src/form/widget/providers/hidden.js +62 -62
- package/src/form/widget/providers/hiddenBox.js +152 -152
- package/src/form/widget/providers/radioBox.js +99 -99
- package/src/form/widget/providers/textArea.js +52 -52
- package/src/form/widget/providers/textBox.js +48 -48
- package/src/form/widget/scss/widget.scss +55 -55
- package/src/form/widget/tpl/checkBox.tpl +25 -25
- package/src/form/widget/tpl/comboBox.tpl +13 -13
- package/src/form/widget/tpl/hidden.tpl +1 -1
- package/src/form/widget/tpl/hiddenBox.tpl +17 -17
- package/src/form/widget/tpl/label.tpl +6 -6
- package/src/form/widget/tpl/radioBox.tpl +25 -25
- package/src/form/widget/tpl/textArea.tpl +8 -8
- package/src/form/widget/tpl/widget.tpl +8 -8
- package/src/form/widget/widget.js +372 -372
- package/src/form.js +53 -53
- package/src/formValidator/formValidator.js +253 -253
- package/src/formValidator/highlighters/highlighter.js +102 -102
- package/src/formValidator/highlighters/message.js +70 -70
- package/src/formValidator/highlighters/tooltip.js +78 -78
- package/src/generis/form/css/form.css +7 -7
- package/src/generis/form/css/form.css.map +1 -1
- package/src/generis/form/form.js +239 -239
- package/src/generis/form/readme.md +70 -70
- package/src/generis/form/scss/form.scss +23 -23
- package/src/generis/form/tpl/form.tpl +16 -16
- package/src/generis/validator/css/validator.css +7 -7
- package/src/generis/validator/css/validator.css.map +1 -1
- package/src/generis/validator/readme.md +46 -46
- package/src/generis/validator/scss/validator.scss +13 -13
- package/src/generis/validator/validator.js +128 -128
- package/src/generis/widget/checkBox/checkBox.js +112 -112
- package/src/generis/widget/checkBox/checkBox.tpl +18 -18
- package/src/generis/widget/comboBox/comboBox.js +67 -67
- package/src/generis/widget/comboBox/comboBox.tpl +12 -12
- package/src/generis/widget/css/widget.css +7 -7
- package/src/generis/widget/css/widget.css.map +1 -1
- package/src/generis/widget/hiddenBox/hiddenBox.js +132 -132
- package/src/generis/widget/hiddenBox/hiddenBox.tpl +16 -16
- package/src/generis/widget/loader.js +49 -49
- package/src/generis/widget/readme.md +59 -59
- package/src/generis/widget/scss/widget.scss +61 -61
- package/src/generis/widget/textBox/textBox.js +65 -65
- package/src/generis/widget/textBox/textBox.tpl +7 -7
- package/src/generis/widget/widget.js +164 -164
- package/src/generis/widget/widget.tpl +5 -5
- package/src/groupedComboBox.js +99 -99
- package/src/groupvalidator.js +84 -84
- package/src/hider.js +88 -88
- package/src/highlighter.js +1166 -1166
- package/src/image/ImgStateActive/extractLabel.js +29 -29
- package/src/image/ImgStateActive/helper.js +36 -36
- package/src/image/ImgStateActive/initHelper.js +137 -137
- package/src/image/ImgStateActive/initMediaEditor.js +92 -92
- package/src/image/ImgStateActive/mediaSizer.js +63 -63
- package/src/image/ImgStateActive.js +115 -115
- package/src/incrementer.js +319 -319
- package/src/inplacer.js +316 -316
- package/src/interactUtils.js +140 -140
- package/src/itemButtonList/css/item-button-list.css +23 -23
- package/src/itemButtonList/css/item-button-list.css.map +1 -1
- package/src/itemButtonList/scss/item-button-list.scss +236 -236
- package/src/itemButtonList/tpl/itemButtonList.tpl +21 -21
- package/src/itemButtonList.js +274 -274
- package/src/keyNavigation/navigableDomElement.js +282 -282
- package/src/keyNavigation/navigator.js +543 -543
- package/src/listbox/css/listbox.css +7 -7
- package/src/listbox/css/listbox.css.map +1 -1
- package/src/listbox/scss/listbox.scss +116 -116
- package/src/listbox/tpl/list.tpl +14 -14
- package/src/listbox/tpl/main.tpl +9 -9
- package/src/listbox.js +251 -251
- package/src/liststyler.js +155 -155
- package/src/loadingButton/css/button.css +7 -7
- package/src/loadingButton/css/button.css.map +1 -1
- package/src/loadingButton/loadingButton.js +110 -110
- package/src/loadingButton/scss/button.scss +41 -41
- package/src/loadingButton/tpl/button.tpl +5 -5
- package/src/lock/lock.tpl +16 -16
- package/src/lock.js +395 -395
- package/src/login/login.js +322 -322
- package/src/login/tpl/login.tpl +29 -29
- package/src/login/tpl/passwordReveal.tpl +7 -7
- package/src/maths/calculator/basicCalculator.js +55 -55
- package/src/maths/calculator/calculatorComponent.js +128 -128
- package/src/maths/calculator/core/areaBroker.js +38 -38
- package/src/maths/calculator/core/board.js +841 -841
- package/src/maths/calculator/core/expression.js +430 -430
- package/src/maths/calculator/core/labels.js +116 -116
- package/src/maths/calculator/core/plugin.js +40 -40
- package/src/maths/calculator/core/terms.js +459 -459
- package/src/maths/calculator/core/tokenizer.js +245 -245
- package/src/maths/calculator/core/tokens.js +178 -178
- package/src/maths/calculator/core/tpl/board.tpl +4 -4
- package/src/maths/calculator/css/calculator.css +7 -7
- package/src/maths/calculator/css/calculator.css.map +1 -1
- package/src/maths/calculator/defaultCalculator.js +66 -66
- package/src/maths/calculator/plugins/core/degrad.js +90 -90
- package/src/maths/calculator/plugins/core/history.js +166 -166
- package/src/maths/calculator/plugins/core/remind.js +96 -96
- package/src/maths/calculator/plugins/core/stepNavigation.js +175 -175
- package/src/maths/calculator/plugins/keyboard/templateKeyboard/defaultTemplate.tpl +36 -36
- package/src/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +91 -91
- package/src/maths/calculator/plugins/modifiers/pow10.js +143 -143
- package/src/maths/calculator/plugins/modifiers/sign.js +339 -339
- package/src/maths/calculator/plugins/screen/simpleScreen/defaultTemplate.tpl +3 -3
- package/src/maths/calculator/plugins/screen/simpleScreen/history.tpl +3 -3
- package/src/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +191 -191
- package/src/maths/calculator/pluginsLoader.js +46 -46
- package/src/maths/calculator/scientificCalculator.js +74 -74
- package/src/maths/calculator/scss/calculator.scss +396 -396
- package/src/maths/calculator/tpl/basicKeyboard.tpl +37 -37
- package/src/maths/calculator/tpl/basicScreen.tpl +2 -2
- package/src/maths/calculator/tpl/scientificKeyboard.tpl +61 -61
- package/src/maths/calculator/tpl/scientificScreen.tpl +3 -3
- package/src/mediaEditor/mediaEditorComponent.js +141 -141
- package/src/mediaEditor/plugins/mediaAlignment/helper.js +62 -62
- package/src/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +99 -99
- package/src/mediaEditor/plugins/mediaAlignment/style.css +7 -7
- package/src/mediaEditor/plugins/mediaAlignment/tpl/mediaAlignment.tpl +25 -25
- package/src/mediaEditor/plugins/mediaDimension/helper.js +189 -189
- package/src/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +561 -561
- package/src/mediaEditor/plugins/mediaDimension/style.css +141 -141
- package/src/mediaEditor/plugins/mediaDimension/tpl/mediaDimension.tpl +55 -55
- package/src/mediaEditor/tpl/editor.tpl +4 -4
- package/src/mediaplayer/css/player.css +7 -7
- package/src/mediaplayer/css/player.css.map +1 -1
- package/src/mediaplayer/players/html5.js +564 -564
- package/src/mediaplayer/players/youtube.js +323 -323
- package/src/mediaplayer/players.js +29 -29
- package/src/mediaplayer/readme.md +305 -305
- package/src/mediaplayer/scss/player.scss +569 -569
- package/src/mediaplayer/support.js +126 -126
- package/src/mediaplayer/tpl/audio.tpl +6 -6
- package/src/mediaplayer/tpl/player.tpl +37 -37
- package/src/mediaplayer/tpl/source.tpl +1 -1
- package/src/mediaplayer/tpl/video.tpl +6 -6
- package/src/mediaplayer/tpl/youtube.tpl +1 -1
- package/src/mediaplayer/utils/reminder.js +184 -184
- package/src/mediaplayer/utils/timeObserver.js +143 -143
- package/src/mediaplayer/youtubeManager.js +161 -161
- package/src/mediaplayer.js +1606 -1606
- package/src/mediasizer/mediasizer.tpl +55 -55
- package/src/mediasizer.js +635 -635
- package/src/modal.js +365 -365
- package/src/movableComponent.js +78 -78
- package/src/pageSizeSelector/tpl/pageSizeSelector.tpl +9 -9
- package/src/pageSizeSelector.js +107 -107
- package/src/pageStatus.js +147 -147
- package/src/pagination/css/pagination.css +7 -7
- package/src/pagination/css/pagination.css.map +1 -1
- package/src/pagination/paginationStrategy.js +53 -53
- package/src/pagination/providers/pages.js +161 -161
- package/src/pagination/providers/simple.js +74 -74
- package/src/pagination/providers/tpl/pages/page.tpl +1 -1
- package/src/pagination/providers/tpl/pages.tpl +8 -8
- package/src/pagination/providers/tpl/simple.tpl +7 -7
- package/src/pagination/scss/pagination.scss +111 -111
- package/src/pagination.js +237 -237
- package/src/previewer.js +300 -300
- package/src/progressbar.js +165 -165
- package/src/propertySelector/css/propertySelector.css +74 -0
- package/src/propertySelector/css/propertySelector.css.map +1 -0
- package/src/propertySelector/propertySelector.js +286 -0
- package/src/propertySelector/scss/propertySelector.scss +66 -0
- package/src/propertySelector/tpl/highlighted-text.tpl +1 -0
- package/src/propertySelector/tpl/property-description.tpl +13 -0
- package/src/propertySelector/tpl/property-selector.tpl +7 -0
- package/src/report/feedback.tpl +11 -11
- package/src/report/layout.tpl +10 -10
- package/src/report.js +184 -184
- package/src/resource/css/selector.css +7 -7
- package/src/resource/css/selector.css.map +1 -1
- package/src/resource/filters.js +208 -208
- package/src/resource/list.js +200 -200
- package/src/resource/scss/_filters.scss +26 -26
- package/src/resource/scss/_resource-list.scss +107 -107
- package/src/resource/scss/_resource-tree.scss +205 -205
- package/src/resource/scss/selector.scss +187 -187
- package/src/resource/selectable.js +322 -322
- package/src/resource/selector.js +871 -871
- package/src/resource/tpl/filters.tpl +2 -2
- package/src/resource/tpl/list.tpl +7 -7
- package/src/resource/tpl/listNode.tpl +4 -4
- package/src/resource/tpl/selector.tpl +46 -46
- package/src/resource/tpl/tree.tpl +4 -4
- package/src/resource/tpl/treeNode.tpl +30 -30
- package/src/resource/tree.js +400 -400
- package/src/resourcemgr/css/resourcemgr.css +7 -7
- package/src/resourcemgr/css/resourcemgr.css.map +1 -1
- package/src/resourcemgr/fileBrowser.js +381 -381
- package/src/resourcemgr/filePreview.js +73 -73
- package/src/resourcemgr/fileSelector.js +348 -348
- package/src/resourcemgr/scss/resourcemgr.scss +254 -254
- package/src/resourcemgr/tpl/fileSelect.tpl +39 -39
- package/src/resourcemgr/tpl/folder.tpl +11 -11
- package/src/resourcemgr/tpl/layout.tpl +84 -84
- package/src/resourcemgr/tpl/rootFolder.tpl +13 -13
- package/src/resourcemgr/util/updatePermissions.js +53 -53
- package/src/resourcemgr.js +216 -216
- package/src/scroller.js +94 -94
- package/src/scss/basic.scss +16 -16
- package/src/searchModal/advancedSearch.js +638 -601
- package/src/searchModal/css/advancedSearch.css +7 -14
- package/src/searchModal/css/advancedSearch.css.map +1 -1
- package/src/searchModal/css/searchModal.css +29 -8
- package/src/searchModal/css/searchModal.css.map +1 -1
- package/src/searchModal/scss/advancedSearch.scss +171 -177
- package/src/searchModal/scss/searchModal.scss +393 -375
- package/src/searchModal/tpl/advanced-search.tpl +9 -9
- package/src/searchModal/tpl/criteria-alias.tpl +1 -0
- package/src/searchModal/tpl/criteria-class-label.tpl +1 -0
- package/src/searchModal/tpl/criteria-label.tpl +1 -0
- package/src/searchModal/tpl/highlighted-text.tpl +1 -0
- package/src/searchModal/tpl/info-message.tpl +3 -3
- package/src/searchModal/tpl/invalid-criteria-warning.tpl +10 -10
- package/src/searchModal/tpl/layout.tpl +27 -25
- package/src/searchModal/tpl/list-checkbox-criterion.tpl +17 -12
- package/src/searchModal/tpl/list-select-criterion.tpl +12 -6
- package/src/searchModal/tpl/property-select-button.tpl +1 -0
- package/src/searchModal/tpl/results-container.tpl +1 -0
- package/src/searchModal/tpl/text-criterion.tpl +11 -6
- package/src/searchModal.js +761 -496
- package/src/selecter.js +43 -43
- package/src/stacker.js +133 -133
- package/src/switch/css/switch.css +7 -7
- package/src/switch/css/switch.css.map +1 -1
- package/src/switch/scss/switch.scss +83 -83
- package/src/switch/switch.js +195 -195
- package/src/switch/tpl/switch.tpl +7 -7
- package/src/tableModel.js +112 -112
- package/src/tabs/css/tabs.css +12 -12
- package/src/tabs/css/tabs.css.map +1 -1
- package/src/tabs/scss/tabs.scss +50 -50
- package/src/tabs/tpl/panel.tpl +3 -3
- package/src/tabs/tpl/tabs.tpl +10 -10
- package/src/tabs.js +528 -528
- package/src/taskQueue/css/taskQueue.css +7 -7
- package/src/taskQueue/css/taskQueue.css.map +1 -1
- package/src/taskQueue/scss/taskQueue.scss +47 -47
- package/src/taskQueue/status.js +228 -228
- package/src/taskQueue/table.js +350 -350
- package/src/taskQueue/taskQueue.js +33 -33
- package/src/taskQueue/taskQueueModel.js +548 -548
- package/src/taskQueue/tpl/statusMessage.tpl +7 -7
- package/src/taskQueue.js +218 -218
- package/src/taskQueueButton/css/taskable.css +7 -7
- package/src/taskQueueButton/css/taskable.css.map +1 -1
- package/src/taskQueueButton/css/treeButton.css +7 -7
- package/src/taskQueueButton/css/treeButton.css.map +1 -1
- package/src/taskQueueButton/scss/taskable.scss +4 -4
- package/src/taskQueueButton/scss/treeButton.scss +34 -34
- package/src/taskQueueButton/standardButton.js +108 -108
- package/src/taskQueueButton/taskable.js +202 -202
- package/src/taskQueueButton/tpl/report.tpl +5 -5
- package/src/taskQueueButton/tpl/treeButton.tpl +6 -6
- package/src/taskQueueButton/treeButton.js +109 -109
- package/src/themeLoader.js +252 -252
- package/src/themes.js +162 -162
- package/src/toggler.js +200 -200
- package/src/tooltip/default.tpl +3 -3
- package/src/tooltip.js +160 -160
- package/src/tooltipster.js +25 -25
- package/src/transformer.js +327 -327
- package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
- package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/src/tristateCheckboxGroup/scss/tristateCheckboxGroup.scss +15 -15
- package/src/tristateCheckboxGroup/tpl/li.tpl +6 -6
- package/src/tristateCheckboxGroup.js +207 -207
- package/src/uploader/fileEntry.tpl +6 -6
- package/src/uploader/uploader.tpl +32 -32
- package/src/uploader.js +594 -594
- package/src/validator/Report.js +10 -10
- package/src/validator/Validator.js +108 -108
- package/src/validator/validators.js +220 -220
- package/src/validator.js +264 -264
- package/src/waitForMedia.js +82 -82
- package/src/waitingDialog/css/waitingDialog.css +7 -7
- package/src/waitingDialog/css/waitingDialog.css.map +1 -1
- package/src/waitingDialog/scss/waitingDialog.scss +34 -34
- package/src/waitingDialog/waitingDialog.js +240 -240
package/dist/mediaplayer.js
CHANGED
|
@@ -28,24 +28,24 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
28
28
|
hb.registerHelper('__', function (key) {
|
|
29
29
|
return __(key);
|
|
30
30
|
});
|
|
31
|
-
/**
|
|
32
|
-
* Register dompurify helper
|
|
33
|
-
*
|
|
34
|
-
* https://github.com/cure53/DOMPurify
|
|
35
|
-
* with config SAFE_FOR_TEMPLATES: true
|
|
36
|
-
* to make output safe for template systems
|
|
31
|
+
/**
|
|
32
|
+
* Register dompurify helper
|
|
33
|
+
*
|
|
34
|
+
* https://github.com/cure53/DOMPurify
|
|
35
|
+
* with config SAFE_FOR_TEMPLATES: true
|
|
36
|
+
* to make output safe for template systems
|
|
37
37
|
*/
|
|
38
38
|
|
|
39
39
|
hb.registerHelper('dompurify', function (context) {
|
|
40
40
|
return DOMPurify.sanitize(context);
|
|
41
41
|
});
|
|
42
|
-
/**
|
|
43
|
-
* Register join helper
|
|
44
|
-
*
|
|
45
|
-
* Example :
|
|
46
|
-
* var values = {a:v1, b:v2, c:v3};
|
|
47
|
-
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
48
|
-
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
42
|
+
/**
|
|
43
|
+
* Register join helper
|
|
44
|
+
*
|
|
45
|
+
* Example :
|
|
46
|
+
* var values = {a:v1, b:v2, c:v3};
|
|
47
|
+
* Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
|
|
48
|
+
* Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
|
|
@@ -128,35 +128,35 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
128
128
|
if (helper = helpers.type) { stack1 = helper.call(depth0, {hash:{},data:data}); }
|
|
129
129
|
else { helper = (depth0 && depth0.type); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
|
|
130
130
|
buffer += escapeExpression(stack1)
|
|
131
|
-
+ "\">\
|
|
131
|
+
+ "\">\n <div class=\"player\">\n <div class=\"player-overlay\">\n <a class=\"action play\" data-control=\"play\"><span class=\"icon icon-play\" title=\""
|
|
132
132
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Play", options) : helperMissing.call(depth0, "__", "Play", options)))
|
|
133
|
-
+ "\"></span></a>\
|
|
133
|
+
+ "\"></span></a>\n <a class=\"action play\" data-control=\"pause\"><span class=\"icon icon-pause\" title=\""
|
|
134
134
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Pause", options) : helperMissing.call(depth0, "__", "Pause", options)))
|
|
135
|
-
+ "\"></span></a>\
|
|
135
|
+
+ "\"></span></a>\n <a class=\"action reload\" data-control=\"start\">\n <span class=\"icon icon-play\" title=\""
|
|
136
136
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Start", options) : helperMissing.call(depth0, "__", "Start", options)))
|
|
137
|
-
+ "\"></span>\
|
|
137
|
+
+ "\"></span>\n <div class=\"message\">"
|
|
138
138
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Click to start", options) : helperMissing.call(depth0, "__", "Click to start", options)))
|
|
139
|
-
+ "</div>\
|
|
139
|
+
+ "</div>\n </a>\n <a class=\"action reload\" data-control=\"reload\">\n <div class=\"icon icon-reload\" title=\""
|
|
140
140
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Reload", options) : helperMissing.call(depth0, "__", "Reload", options)))
|
|
141
|
-
+ "\"></div>\
|
|
141
|
+
+ "\"></div>\n <div class=\"message\">"
|
|
142
142
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "You are encountering a prolonged connectivity loss.", options) : helperMissing.call(depth0, "__", "You are encountering a prolonged connectivity loss.", options)))
|
|
143
143
|
+ " "
|
|
144
144
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Click to reload.", options) : helperMissing.call(depth0, "__", "Click to reload.", options)))
|
|
145
|
-
+ "</div>\
|
|
145
|
+
+ "</div>\n </a>\n </div>\n </div>\n <div class=\"controls\">\n <div class=\"bar\">\n <div class=\"control actions playback\">\n <a class=\"action play\" data-control=\"play\" title=\""
|
|
146
146
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Play", options) : helperMissing.call(depth0, "__", "Play", options)))
|
|
147
|
-
+ "\"><span class=\"icon icon-play\"></span></a>\
|
|
147
|
+
+ "\"><span class=\"icon icon-play\"></span></a>\n <a class=\"action play\" data-control=\"pause\" title=\""
|
|
148
148
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Pause", options) : helperMissing.call(depth0, "__", "Pause", options)))
|
|
149
|
-
+ "\"><span class=\"icon icon-pause\"></span></a>\
|
|
149
|
+
+ "\"><span class=\"icon icon-pause\"></span></a>\n </div>\n <div class=\"control seek\"><div class=\"slider\"></div></div>\n <div class=\"control infos timer\">\n <span class=\"info time\" data-control=\"time-cur\" title=\""
|
|
150
150
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Current playback position", options) : helperMissing.call(depth0, "__", "Current playback position", options)))
|
|
151
|
-
+ "\">--:--</span>\
|
|
151
|
+
+ "\">--:--</span>\n <span class=\"info time\" data-control=\"time-end\" title=\""
|
|
152
152
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Total duration", options) : helperMissing.call(depth0, "__", "Total duration", options)))
|
|
153
|
-
+ "\">--:--</span>\
|
|
153
|
+
+ "\">--:--</span>\n </div>\n <div class=\"control actions sound\">\n <div class=\"volume\"><div class=\"slider\"></div></div>\n <a class=\"action mute\" data-control=\"mute\" title=\""
|
|
154
154
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Mute", options) : helperMissing.call(depth0, "__", "Mute", options)))
|
|
155
|
-
+ "\"><span class=\"icon icon-sound\"></span></a>\
|
|
155
|
+
+ "\"><span class=\"icon icon-sound\"></span></a>\n <a class=\"action mute\" data-control=\"unmute\" title=\""
|
|
156
156
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "Restore sound", options) : helperMissing.call(depth0, "__", "Restore sound", options)))
|
|
157
|
-
+ "\"><span class=\"icon icon-mute\"></span></a>\
|
|
157
|
+
+ "\"><span class=\"icon icon-mute\"></span></a>\n </div>\n </div>\n </div>\n <div class=\"error\">\n <div class=\"message\">"
|
|
158
158
|
+ escapeExpression((helper = helpers.__ || (depth0 && depth0.__),options={hash:{},data:data},helper ? helper.call(depth0, "This media cannot be played!", options) : helperMissing.call(depth0, "__", "This media cannot be played!", options)))
|
|
159
|
-
+ "</div>\
|
|
159
|
+
+ "</div>\n </div>\n</div>\n";
|
|
160
160
|
return buffer;
|
|
161
161
|
});
|
|
162
162
|
function playerTpl(data, options, asString) {
|
|
@@ -164,51 +164,51 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
164
164
|
return (asString || true) ? html : $(html);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
/**
|
|
168
|
-
* This program is free software; you can redistribute it and/or
|
|
169
|
-
* modify it under the terms of the GNU General Public License
|
|
170
|
-
* as published by the Free Software Foundation; under version 2
|
|
171
|
-
* of the License (non-upgradable).
|
|
172
|
-
*
|
|
173
|
-
* This program is distributed in the hope that it will be useful,
|
|
174
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
175
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
176
|
-
* GNU General Public License for more details.
|
|
177
|
-
*
|
|
178
|
-
* You should have received a copy of the GNU General Public License
|
|
179
|
-
* along with this program; if not, write to the Free Software
|
|
180
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
181
|
-
*
|
|
182
|
-
* Copyright (c) 2015-2021 (original work) Open Assessment Technologies SA ;
|
|
167
|
+
/**
|
|
168
|
+
* This program is free software; you can redistribute it and/or
|
|
169
|
+
* modify it under the terms of the GNU General Public License
|
|
170
|
+
* as published by the Free Software Foundation; under version 2
|
|
171
|
+
* of the License (non-upgradable).
|
|
172
|
+
*
|
|
173
|
+
* This program is distributed in the hope that it will be useful,
|
|
174
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
175
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
176
|
+
* GNU General Public License for more details.
|
|
177
|
+
*
|
|
178
|
+
* You should have received a copy of the GNU General Public License
|
|
179
|
+
* along with this program; if not, write to the Free Software
|
|
180
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
181
|
+
*
|
|
182
|
+
* Copyright (c) 2015-2021 (original work) Open Assessment Technologies SA ;
|
|
183
183
|
*/
|
|
184
|
-
/**
|
|
185
|
-
* CSS namespace
|
|
186
|
-
* @type {String}
|
|
184
|
+
/**
|
|
185
|
+
* CSS namespace
|
|
186
|
+
* @type {String}
|
|
187
187
|
*/
|
|
188
188
|
|
|
189
189
|
var ns = '.mediaplayer';
|
|
190
|
-
/**
|
|
191
|
-
* Minimum value of the volume
|
|
192
|
-
* @type {Number}
|
|
190
|
+
/**
|
|
191
|
+
* Minimum value of the volume
|
|
192
|
+
* @type {Number}
|
|
193
193
|
*/
|
|
194
194
|
|
|
195
195
|
var volumeMin = 0;
|
|
196
|
-
/**
|
|
197
|
-
* Maximum value of the volume
|
|
198
|
-
* @type {Number}
|
|
196
|
+
/**
|
|
197
|
+
* Maximum value of the volume
|
|
198
|
+
* @type {Number}
|
|
199
199
|
*/
|
|
200
200
|
|
|
201
201
|
var volumeMax = 100;
|
|
202
|
-
/**
|
|
203
|
-
* Threshold (minimum required space above the player) to display the volume
|
|
204
|
-
* above the bar.
|
|
205
|
-
* @type {Number}
|
|
202
|
+
/**
|
|
203
|
+
* Threshold (minimum required space above the player) to display the volume
|
|
204
|
+
* above the bar.
|
|
205
|
+
* @type {Number}
|
|
206
206
|
*/
|
|
207
207
|
|
|
208
208
|
var volumePositionThreshold = 200;
|
|
209
|
-
/**
|
|
210
|
-
* Some default values
|
|
211
|
-
* @type {Object}
|
|
209
|
+
/**
|
|
210
|
+
* Some default values
|
|
211
|
+
* @type {Object}
|
|
212
212
|
*/
|
|
213
213
|
|
|
214
214
|
var defaults = {
|
|
@@ -238,21 +238,21 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
238
238
|
debug: false
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
/**
|
|
242
|
-
* Ensures a value is a number
|
|
243
|
-
* @param {Number|String} value
|
|
244
|
-
* @returns {Number}
|
|
241
|
+
/**
|
|
242
|
+
* Ensures a value is a number
|
|
243
|
+
* @param {Number|String} value
|
|
244
|
+
* @returns {Number}
|
|
245
245
|
*/
|
|
246
246
|
|
|
247
247
|
var ensureNumber = function ensureNumber(value) {
|
|
248
248
|
var floatValue = parseFloat(value);
|
|
249
249
|
return isFinite(floatValue) ? floatValue : 0;
|
|
250
250
|
};
|
|
251
|
-
/**
|
|
252
|
-
* Format a number to string with leading zeros
|
|
253
|
-
* @param {Number} n
|
|
254
|
-
* @param {Number} len
|
|
255
|
-
* @returns {String}
|
|
251
|
+
/**
|
|
252
|
+
* Format a number to string with leading zeros
|
|
253
|
+
* @param {Number} n
|
|
254
|
+
* @param {Number} len
|
|
255
|
+
* @returns {String}
|
|
256
256
|
*/
|
|
257
257
|
|
|
258
258
|
|
|
@@ -265,10 +265,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
265
265
|
|
|
266
266
|
return value;
|
|
267
267
|
};
|
|
268
|
-
/**
|
|
269
|
-
* Formats a time value to string
|
|
270
|
-
* @param {Number} time
|
|
271
|
-
* @returns {String}
|
|
268
|
+
/**
|
|
269
|
+
* Formats a time value to string
|
|
270
|
+
* @param {Number} time
|
|
271
|
+
* @returns {String}
|
|
272
272
|
*/
|
|
273
273
|
|
|
274
274
|
|
|
@@ -286,20 +286,20 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
286
286
|
parts.push(leadingZero(seconds, 2));
|
|
287
287
|
return parts.join(':');
|
|
288
288
|
};
|
|
289
|
-
/**
|
|
290
|
-
* Checks if a type needs to be adjusted
|
|
291
|
-
* @param {String} type
|
|
292
|
-
* @returns {Boolean}
|
|
289
|
+
/**
|
|
290
|
+
* Checks if a type needs to be adjusted
|
|
291
|
+
* @param {String} type
|
|
292
|
+
* @returns {Boolean}
|
|
293
293
|
*/
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
var needTypeAdjust = function needTypeAdjust(type) {
|
|
297
297
|
return 'string' === typeof type && type.indexOf('application') === 0;
|
|
298
298
|
};
|
|
299
|
-
/**
|
|
300
|
-
* Adjust bad type by apllying heuristic on URI
|
|
301
|
-
* @param {Object|String} source
|
|
302
|
-
* @returns {String}
|
|
299
|
+
/**
|
|
300
|
+
* Adjust bad type by apllying heuristic on URI
|
|
301
|
+
* @param {Object|String} source
|
|
302
|
+
* @returns {String}
|
|
303
303
|
*/
|
|
304
304
|
|
|
305
305
|
|
|
@@ -314,10 +314,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
314
314
|
|
|
315
315
|
return type;
|
|
316
316
|
};
|
|
317
|
-
/**
|
|
318
|
-
* Extract a list of media sources from a config object
|
|
319
|
-
* @param {Object} config
|
|
320
|
-
* @returns {Array}
|
|
317
|
+
/**
|
|
318
|
+
* Extract a list of media sources from a config object
|
|
319
|
+
* @param {Object} config
|
|
320
|
+
* @returns {Array}
|
|
321
321
|
*/
|
|
322
322
|
|
|
323
323
|
|
|
@@ -339,65 +339,65 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
339
339
|
|
|
340
340
|
return sources;
|
|
341
341
|
};
|
|
342
|
-
/**
|
|
343
|
-
* Checks if the browser can play media
|
|
344
|
-
* @param {String} sizeProps Width or Height
|
|
345
|
-
* @returns {Boolean}
|
|
342
|
+
/**
|
|
343
|
+
* Checks if the browser can play media
|
|
344
|
+
* @param {String} sizeProps Width or Height
|
|
345
|
+
* @returns {Boolean}
|
|
346
346
|
*/
|
|
347
347
|
|
|
348
348
|
|
|
349
349
|
var isResponsiveSize = function isResponsiveSize(sizeProps) {
|
|
350
350
|
return /%/.test(sizeProps) || sizeProps === 'auto';
|
|
351
351
|
};
|
|
352
|
-
/**
|
|
353
|
-
* Builds a media player instance
|
|
354
|
-
* @param {Object} config
|
|
355
|
-
* @param {String} config.type - The type of media to play, say `audio`, `video`, or `youtube`. The default is `video`.
|
|
356
|
-
* It might also contain the MIME type of the media as a shorthand.
|
|
357
|
-
* @param {String|Array} [config.url] - The URL to the media. If several media are proposed as alternatives,
|
|
358
|
-
* please look at the `sources` option instead.
|
|
359
|
-
* @param {String} [config.mimeType] - The MIME type of the media. If omitted, the player will try to extract it
|
|
360
|
-
* from the `type` property, otherwise it will request the server to get the content-type.
|
|
361
|
-
* @param {Array} [config.sources] - A list of URL if several media can be proposed. Each entry may be either a
|
|
362
|
-
* string (single URL), or an object containing both the URL and the MIME type ({src: string, type: string}).
|
|
363
|
-
* @param {String|jQuery|HTMLElement} [config.renderTo] - An optional container in which renders the player
|
|
364
|
-
* @param {Boolean} [config.canSeek] - The player allows to reach an arbitrary position within the media using the duration bar
|
|
365
|
-
* @param {Boolean} [config.loop] - The media will be played continuously
|
|
366
|
-
* @param {Boolean} [config.canPause] - The player can be paused
|
|
367
|
-
* @param {Boolean} [config.startMuted] - The player should be initially muted
|
|
368
|
-
* @param {Boolean} [config.autoStart] - The player starts as soon as it is displayed
|
|
369
|
-
* @param {Number} [config.autoStartAt] - The time position at which the player should start
|
|
370
|
-
* @param {Number} [config.maxPlays] - Sets a few number of plays (default: infinite)
|
|
371
|
-
* @param {Number} [config.replayTimeout] - disable the possibility to replay a media after this timeout, in seconds (default: 0)
|
|
372
|
-
* @param {Number} [config.volume] - Sets the sound volume (default: 80)
|
|
373
|
-
* @param {Number} [config.width] - Sets the width of the player (default: depends on media type)
|
|
374
|
-
* @param {Number} [config.height] - Sets the height of the player (default: depends on media type)
|
|
375
|
-
* @param {Boolean} [config.preview] - Enables the media preview (load media metadata)
|
|
376
|
-
* @param {Boolean} [config.debug] - Enables the debug mode
|
|
377
|
-
* @param {number} [config.config.stalledDetectionDelay] - The delay before considering a media is stalled
|
|
378
|
-
* @event render - Event triggered when the player is rendering
|
|
379
|
-
* @event error - Event triggered when the player throws an unrecoverable error
|
|
380
|
-
* @event ready - Event triggered when the player is fully ready
|
|
381
|
-
* @event play - Event triggered when the playback is starting
|
|
382
|
-
* @event update - Event triggered while the player is playing
|
|
383
|
-
* @event pause - Event triggered when the playback is paused
|
|
384
|
-
* @event ended - Event triggered when the playback is ended
|
|
385
|
-
* @event limitreached - Event triggered when the play limit has been reached
|
|
386
|
-
* @event destroy - Event triggered when the player is destroying
|
|
387
|
-
* @returns {mediaplayer}
|
|
352
|
+
/**
|
|
353
|
+
* Builds a media player instance
|
|
354
|
+
* @param {Object} config
|
|
355
|
+
* @param {String} config.type - The type of media to play, say `audio`, `video`, or `youtube`. The default is `video`.
|
|
356
|
+
* It might also contain the MIME type of the media as a shorthand.
|
|
357
|
+
* @param {String|Array} [config.url] - The URL to the media. If several media are proposed as alternatives,
|
|
358
|
+
* please look at the `sources` option instead.
|
|
359
|
+
* @param {String} [config.mimeType] - The MIME type of the media. If omitted, the player will try to extract it
|
|
360
|
+
* from the `type` property, otherwise it will request the server to get the content-type.
|
|
361
|
+
* @param {Array} [config.sources] - A list of URL if several media can be proposed. Each entry may be either a
|
|
362
|
+
* string (single URL), or an object containing both the URL and the MIME type ({src: string, type: string}).
|
|
363
|
+
* @param {String|jQuery|HTMLElement} [config.renderTo] - An optional container in which renders the player
|
|
364
|
+
* @param {Boolean} [config.canSeek] - The player allows to reach an arbitrary position within the media using the duration bar
|
|
365
|
+
* @param {Boolean} [config.loop] - The media will be played continuously
|
|
366
|
+
* @param {Boolean} [config.canPause] - The player can be paused
|
|
367
|
+
* @param {Boolean} [config.startMuted] - The player should be initially muted
|
|
368
|
+
* @param {Boolean} [config.autoStart] - The player starts as soon as it is displayed
|
|
369
|
+
* @param {Number} [config.autoStartAt] - The time position at which the player should start
|
|
370
|
+
* @param {Number} [config.maxPlays] - Sets a few number of plays (default: infinite)
|
|
371
|
+
* @param {Number} [config.replayTimeout] - disable the possibility to replay a media after this timeout, in seconds (default: 0)
|
|
372
|
+
* @param {Number} [config.volume] - Sets the sound volume (default: 80)
|
|
373
|
+
* @param {Number} [config.width] - Sets the width of the player (default: depends on media type)
|
|
374
|
+
* @param {Number} [config.height] - Sets the height of the player (default: depends on media type)
|
|
375
|
+
* @param {Boolean} [config.preview] - Enables the media preview (load media metadata)
|
|
376
|
+
* @param {Boolean} [config.debug] - Enables the debug mode
|
|
377
|
+
* @param {number} [config.config.stalledDetectionDelay] - The delay before considering a media is stalled
|
|
378
|
+
* @event render - Event triggered when the player is rendering
|
|
379
|
+
* @event error - Event triggered when the player throws an unrecoverable error
|
|
380
|
+
* @event ready - Event triggered when the player is fully ready
|
|
381
|
+
* @event play - Event triggered when the playback is starting
|
|
382
|
+
* @event update - Event triggered while the player is playing
|
|
383
|
+
* @event pause - Event triggered when the playback is paused
|
|
384
|
+
* @event ended - Event triggered when the playback is ended
|
|
385
|
+
* @event limitreached - Event triggered when the play limit has been reached
|
|
386
|
+
* @event destroy - Event triggered when the player is destroying
|
|
387
|
+
* @returns {mediaplayer}
|
|
388
388
|
*/
|
|
389
389
|
|
|
390
390
|
|
|
391
391
|
function mediaplayerFactory(config) {
|
|
392
|
-
/**
|
|
393
|
-
* Defines a media player object
|
|
394
|
-
* @type {Object}
|
|
392
|
+
/**
|
|
393
|
+
* Defines a media player object
|
|
394
|
+
* @type {Object}
|
|
395
395
|
*/
|
|
396
396
|
var mediaplayer = {
|
|
397
|
-
/**
|
|
398
|
-
* Initializes the media player
|
|
399
|
-
* @param {Object} config
|
|
400
|
-
* @returns {mediaplayer}
|
|
397
|
+
/**
|
|
398
|
+
* Initializes the media player
|
|
399
|
+
* @param {Object} config
|
|
400
|
+
* @returns {mediaplayer}
|
|
401
401
|
*/
|
|
402
402
|
init: function init(config) {
|
|
403
403
|
var _this = this;
|
|
@@ -444,14 +444,14 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
444
444
|
return this;
|
|
445
445
|
},
|
|
446
446
|
|
|
447
|
-
/**
|
|
448
|
-
* Uninstalls the media player
|
|
449
|
-
* @returns {mediaplayer}
|
|
447
|
+
/**
|
|
448
|
+
* Uninstalls the media player
|
|
449
|
+
* @returns {mediaplayer}
|
|
450
450
|
*/
|
|
451
451
|
destroy: function destroy() {
|
|
452
|
-
/**
|
|
453
|
-
* Triggers a destroy event
|
|
454
|
-
* @event mediaplayer#destroy
|
|
452
|
+
/**
|
|
453
|
+
* Triggers a destroy event
|
|
454
|
+
* @event mediaplayer#destroy
|
|
455
455
|
*/
|
|
456
456
|
this.trigger('destroy');
|
|
457
457
|
|
|
@@ -474,10 +474,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
474
474
|
return this;
|
|
475
475
|
},
|
|
476
476
|
|
|
477
|
-
/**
|
|
478
|
-
* Renders the media player according to the media type
|
|
479
|
-
* @param {String|jQuery|HTMLElement} [to]
|
|
480
|
-
* @returns {mediaplayer}
|
|
477
|
+
/**
|
|
478
|
+
* Renders the media player according to the media type
|
|
479
|
+
* @param {String|jQuery|HTMLElement} [to]
|
|
480
|
+
* @returns {mediaplayer}
|
|
481
481
|
*/
|
|
482
482
|
render: function render(to) {
|
|
483
483
|
var renderTo = to || this.config.renderTo || this.$container;
|
|
@@ -521,10 +521,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
521
521
|
if (this.is('stalled')) {
|
|
522
522
|
this._setState('stalled', true);
|
|
523
523
|
}
|
|
524
|
-
/**
|
|
525
|
-
* Triggers a render event
|
|
526
|
-
* @event mediaplayer#render
|
|
527
|
-
* @param {jQuery} $component
|
|
524
|
+
/**
|
|
525
|
+
* Triggers a render event
|
|
526
|
+
* @event mediaplayer#render
|
|
527
|
+
* @param {jQuery} $component
|
|
528
528
|
*/
|
|
529
529
|
|
|
530
530
|
|
|
@@ -532,13 +532,13 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
532
532
|
return this;
|
|
533
533
|
},
|
|
534
534
|
|
|
535
|
-
/**
|
|
536
|
-
* Reloads media player after it was stalled
|
|
535
|
+
/**
|
|
536
|
+
* Reloads media player after it was stalled
|
|
537
537
|
*/
|
|
538
538
|
reload: function reload() {
|
|
539
|
-
/**
|
|
540
|
-
* Triggers a reload event
|
|
541
|
-
* @event mediaplayer#reload
|
|
539
|
+
/**
|
|
540
|
+
* Triggers a reload event
|
|
541
|
+
* @event mediaplayer#reload
|
|
542
542
|
*/
|
|
543
543
|
this.trigger('reload');
|
|
544
544
|
|
|
@@ -551,8 +551,8 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
551
551
|
this.setInitialStates();
|
|
552
552
|
},
|
|
553
553
|
|
|
554
|
-
/**
|
|
555
|
-
* Set initial states
|
|
554
|
+
/**
|
|
555
|
+
* Set initial states
|
|
556
556
|
*/
|
|
557
557
|
setInitialStates: function setInitialStates() {
|
|
558
558
|
if (!this.is('stalled')) {
|
|
@@ -568,11 +568,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
568
568
|
this._setState('loading', false);
|
|
569
569
|
},
|
|
570
570
|
|
|
571
|
-
/**
|
|
572
|
-
* Sets the start position inside the media
|
|
573
|
-
* @param {Number} time - The start position in seconds
|
|
574
|
-
* @param {*} [internal] - Internal use
|
|
575
|
-
* @returns {mediaplayer}
|
|
571
|
+
/**
|
|
572
|
+
* Sets the start position inside the media
|
|
573
|
+
* @param {Number} time - The start position in seconds
|
|
574
|
+
* @param {*} [internal] - Internal use
|
|
575
|
+
* @returns {mediaplayer}
|
|
576
576
|
*/
|
|
577
577
|
seek: function seek(time, internal) {
|
|
578
578
|
if (this._canPlay()) {
|
|
@@ -590,10 +590,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
590
590
|
return this;
|
|
591
591
|
},
|
|
592
592
|
|
|
593
|
-
/**
|
|
594
|
-
* Plays the media
|
|
595
|
-
* @param {Number} [time] - An optional start position in seconds
|
|
596
|
-
* @returns {mediaplayer}
|
|
593
|
+
/**
|
|
594
|
+
* Plays the media
|
|
595
|
+
* @param {Number} [time] - An optional start position in seconds
|
|
596
|
+
* @returns {mediaplayer}
|
|
597
597
|
*/
|
|
598
598
|
play: function play(time) {
|
|
599
599
|
if (this._canPlay()) {
|
|
@@ -617,10 +617,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
617
617
|
return this;
|
|
618
618
|
},
|
|
619
619
|
|
|
620
|
-
/**
|
|
621
|
-
* Pauses the media
|
|
622
|
-
* @param {Number} [time] - An optional time position in seconds
|
|
623
|
-
* @returns {mediaplayer}
|
|
620
|
+
/**
|
|
621
|
+
* Pauses the media
|
|
622
|
+
* @param {Number} [time] - An optional time position in seconds
|
|
623
|
+
* @returns {mediaplayer}
|
|
624
624
|
*/
|
|
625
625
|
pause: function pause(time) {
|
|
626
626
|
if (this._canPause()) {
|
|
@@ -638,9 +638,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
638
638
|
return this;
|
|
639
639
|
},
|
|
640
640
|
|
|
641
|
-
/**
|
|
642
|
-
* Resumes the media
|
|
643
|
-
* @returns {mediaplayer}
|
|
641
|
+
/**
|
|
642
|
+
* Resumes the media
|
|
643
|
+
* @returns {mediaplayer}
|
|
644
644
|
*/
|
|
645
645
|
resume: function resume() {
|
|
646
646
|
if (this._canResume()) {
|
|
@@ -650,9 +650,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
650
650
|
return this;
|
|
651
651
|
},
|
|
652
652
|
|
|
653
|
-
/**
|
|
654
|
-
* Stops the playback
|
|
655
|
-
* @returns {mediaplayer}
|
|
653
|
+
/**
|
|
654
|
+
* Stops the playback
|
|
655
|
+
* @returns {mediaplayer}
|
|
656
656
|
*/
|
|
657
657
|
stop: function stop() {
|
|
658
658
|
this.loop = false;
|
|
@@ -665,9 +665,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
665
665
|
return this;
|
|
666
666
|
},
|
|
667
667
|
|
|
668
|
-
/**
|
|
669
|
-
* Starts the media
|
|
670
|
-
* @returns {mediaplayer}
|
|
668
|
+
/**
|
|
669
|
+
* Starts the media
|
|
670
|
+
* @returns {mediaplayer}
|
|
671
671
|
*/
|
|
672
672
|
start: function start() {
|
|
673
673
|
this._setState('preview', true);
|
|
@@ -677,28 +677,28 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
677
677
|
this.play();
|
|
678
678
|
},
|
|
679
679
|
|
|
680
|
-
/**
|
|
681
|
-
* Restarts the media from the beginning
|
|
682
|
-
* @returns {mediaplayer}
|
|
680
|
+
/**
|
|
681
|
+
* Restarts the media from the beginning
|
|
682
|
+
* @returns {mediaplayer}
|
|
683
683
|
*/
|
|
684
684
|
restart: function restart() {
|
|
685
685
|
this.play(0);
|
|
686
686
|
return this;
|
|
687
687
|
},
|
|
688
688
|
|
|
689
|
-
/**
|
|
690
|
-
* Rewind the media to the beginning
|
|
691
|
-
* @returns {mediaplayer}
|
|
689
|
+
/**
|
|
690
|
+
* Rewind the media to the beginning
|
|
691
|
+
* @returns {mediaplayer}
|
|
692
692
|
*/
|
|
693
693
|
rewind: function rewind() {
|
|
694
694
|
this.seek(0);
|
|
695
695
|
return this;
|
|
696
696
|
},
|
|
697
697
|
|
|
698
|
-
/**
|
|
699
|
-
* Mutes the media
|
|
700
|
-
* @param {Boolean} [state] - A flag to set the mute state (default: true)
|
|
701
|
-
* @returns {mediaplayer}
|
|
698
|
+
/**
|
|
699
|
+
* Mutes the media
|
|
700
|
+
* @param {Boolean} [state] - A flag to set the mute state (default: true)
|
|
701
|
+
* @returns {mediaplayer}
|
|
702
702
|
*/
|
|
703
703
|
mute: function mute(state) {
|
|
704
704
|
if (typeof state === 'undefined') {
|
|
@@ -716,20 +716,20 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
716
716
|
return this;
|
|
717
717
|
},
|
|
718
718
|
|
|
719
|
-
/**
|
|
720
|
-
* Restore the sound of the media after a mute
|
|
721
|
-
* @returns {mediaplayer}
|
|
719
|
+
/**
|
|
720
|
+
* Restore the sound of the media after a mute
|
|
721
|
+
* @returns {mediaplayer}
|
|
722
722
|
*/
|
|
723
723
|
unmute: function unmute() {
|
|
724
724
|
this.mute(false);
|
|
725
725
|
return this;
|
|
726
726
|
},
|
|
727
727
|
|
|
728
|
-
/**
|
|
729
|
-
* Sets the sound volume of the media being played
|
|
730
|
-
* @param {Number} value - A value between 0 and 100
|
|
731
|
-
* @param {*} [internal] - Internal use
|
|
732
|
-
* @returns {mediaplayer}
|
|
728
|
+
/**
|
|
729
|
+
* Sets the sound volume of the media being played
|
|
730
|
+
* @param {Number} value - A value between 0 and 100
|
|
731
|
+
* @param {*} [internal] - Internal use
|
|
732
|
+
* @returns {mediaplayer}
|
|
733
733
|
*/
|
|
734
734
|
setVolume: function setVolume(value, internal) {
|
|
735
735
|
this._updateVolume(value, internal);
|
|
@@ -738,49 +738,49 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
738
738
|
return this;
|
|
739
739
|
},
|
|
740
740
|
|
|
741
|
-
/**
|
|
742
|
-
* Gets the sound volume applied to the media being played
|
|
743
|
-
* @returns {Number} Returns a value between 0 and 100
|
|
741
|
+
/**
|
|
742
|
+
* Gets the sound volume applied to the media being played
|
|
743
|
+
* @returns {Number} Returns a value between 0 and 100
|
|
744
744
|
*/
|
|
745
745
|
getVolume: function getVolume() {
|
|
746
746
|
return this.volume;
|
|
747
747
|
},
|
|
748
748
|
|
|
749
|
-
/**
|
|
750
|
-
* Gets the current displayed position inside the media
|
|
751
|
-
* @returns {Number}
|
|
749
|
+
/**
|
|
750
|
+
* Gets the current displayed position inside the media
|
|
751
|
+
* @returns {Number}
|
|
752
752
|
*/
|
|
753
753
|
getPosition: function getPosition() {
|
|
754
754
|
return this.position;
|
|
755
755
|
},
|
|
756
756
|
|
|
757
|
-
/**
|
|
758
|
-
* Gets the duration of the media
|
|
759
|
-
* @returns {Number}
|
|
757
|
+
/**
|
|
758
|
+
* Gets the duration of the media
|
|
759
|
+
* @returns {Number}
|
|
760
760
|
*/
|
|
761
761
|
getDuration: function getDuration() {
|
|
762
762
|
return this.duration;
|
|
763
763
|
},
|
|
764
764
|
|
|
765
|
-
/**
|
|
766
|
-
* Gets the number of times the media has been played
|
|
767
|
-
* @returns {Number}
|
|
765
|
+
/**
|
|
766
|
+
* Gets the number of times the media has been played
|
|
767
|
+
* @returns {Number}
|
|
768
768
|
*/
|
|
769
769
|
getTimesPlayed: function getTimesPlayed() {
|
|
770
770
|
return this.timesPlayed;
|
|
771
771
|
},
|
|
772
772
|
|
|
773
|
-
/**
|
|
774
|
-
* Gets the type of player
|
|
775
|
-
* @returns {String}
|
|
773
|
+
/**
|
|
774
|
+
* Gets the type of player
|
|
775
|
+
* @returns {String}
|
|
776
776
|
*/
|
|
777
777
|
getType: function getType() {
|
|
778
778
|
return this.type;
|
|
779
779
|
},
|
|
780
780
|
|
|
781
|
-
/**
|
|
782
|
-
* Gets the DOM container
|
|
783
|
-
* @returns {jQuery}
|
|
781
|
+
/**
|
|
782
|
+
* Gets the DOM container
|
|
783
|
+
* @returns {jQuery}
|
|
784
784
|
*/
|
|
785
785
|
getContainer: function getContainer() {
|
|
786
786
|
if (!this.$container && this.$component) {
|
|
@@ -794,27 +794,27 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
794
794
|
return this.$container;
|
|
795
795
|
},
|
|
796
796
|
|
|
797
|
-
/**
|
|
798
|
-
* Gets the underlying DOM element
|
|
799
|
-
* @returns {jQuery}
|
|
797
|
+
/**
|
|
798
|
+
* Gets the underlying DOM element
|
|
799
|
+
* @returns {jQuery}
|
|
800
800
|
*/
|
|
801
801
|
getElement: function getElement() {
|
|
802
802
|
return this.$component;
|
|
803
803
|
},
|
|
804
804
|
|
|
805
|
-
/**
|
|
806
|
-
* Gets the list of media
|
|
807
|
-
* @returns {Array}
|
|
805
|
+
/**
|
|
806
|
+
* Gets the list of media
|
|
807
|
+
* @returns {Array}
|
|
808
808
|
*/
|
|
809
809
|
getSources: function getSources() {
|
|
810
810
|
return this.config.sources.slice();
|
|
811
811
|
},
|
|
812
812
|
|
|
813
|
-
/**
|
|
814
|
-
* Sets the media source. If a source has been already set, it will be replaced.
|
|
815
|
-
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
816
|
-
* @param {Function} [callback] - A function called to provide the added media source object
|
|
817
|
-
* @returns {mediaplayer}
|
|
813
|
+
/**
|
|
814
|
+
* Sets the media source. If a source has been already set, it will be replaced.
|
|
815
|
+
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
816
|
+
* @param {Function} [callback] - A function called to provide the added media source object
|
|
817
|
+
* @returns {mediaplayer}
|
|
818
818
|
*/
|
|
819
819
|
setSource: function setSource(src, callback) {
|
|
820
820
|
var _this2 = this;
|
|
@@ -834,11 +834,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
834
834
|
return this;
|
|
835
835
|
},
|
|
836
836
|
|
|
837
|
-
/**
|
|
838
|
-
* Adds a media source.
|
|
839
|
-
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
840
|
-
* @param {Function} [callback] - A function called to provide the added media source object
|
|
841
|
-
* @returns {mediaplayer}
|
|
837
|
+
/**
|
|
838
|
+
* Adds a media source.
|
|
839
|
+
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
840
|
+
* @param {Function} [callback] - A function called to provide the added media source object
|
|
841
|
+
* @returns {mediaplayer}
|
|
842
842
|
*/
|
|
843
843
|
addSource: function addSource(src, callback) {
|
|
844
844
|
var _this3 = this;
|
|
@@ -858,20 +858,20 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
858
858
|
return this;
|
|
859
859
|
},
|
|
860
860
|
|
|
861
|
-
/**
|
|
862
|
-
* Tells if the media is in a particular state
|
|
863
|
-
* @param {String} state
|
|
864
|
-
* @returns {Boolean}
|
|
861
|
+
/**
|
|
862
|
+
* Tells if the media is in a particular state
|
|
863
|
+
* @param {String} state
|
|
864
|
+
* @returns {Boolean}
|
|
865
865
|
*/
|
|
866
866
|
is: function is(state) {
|
|
867
867
|
return !!this.config.is[state];
|
|
868
868
|
},
|
|
869
869
|
|
|
870
|
-
/**
|
|
871
|
-
* Changes the size of the player
|
|
872
|
-
* @param {Number} width
|
|
873
|
-
* @param {Number} height
|
|
874
|
-
* @returns {mediaplayer}
|
|
870
|
+
/**
|
|
871
|
+
* Changes the size of the player
|
|
872
|
+
* @param {Number} width
|
|
873
|
+
* @param {Number} height
|
|
874
|
+
* @returns {mediaplayer}
|
|
875
875
|
*/
|
|
876
876
|
resize: function resize(width, height) {
|
|
877
877
|
if (isResponsiveSize(width) && !isResponsiveSize(height) || this.is('youtube')) {
|
|
@@ -884,9 +884,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
884
884
|
return this;
|
|
885
885
|
},
|
|
886
886
|
|
|
887
|
-
/**
|
|
888
|
-
* Enables the media player
|
|
889
|
-
* @returns {mediaplayer}
|
|
887
|
+
/**
|
|
888
|
+
* Enables the media player
|
|
889
|
+
* @returns {mediaplayer}
|
|
890
890
|
*/
|
|
891
891
|
enable: function enable() {
|
|
892
892
|
this._fromState('disabled');
|
|
@@ -894,9 +894,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
894
894
|
return this;
|
|
895
895
|
},
|
|
896
896
|
|
|
897
|
-
/**
|
|
898
|
-
* Disables the media player
|
|
899
|
-
* @returns {mediaplayer}
|
|
897
|
+
/**
|
|
898
|
+
* Disables the media player
|
|
899
|
+
* @returns {mediaplayer}
|
|
900
900
|
*/
|
|
901
901
|
disable: function disable() {
|
|
902
902
|
this._toState('disabled');
|
|
@@ -905,9 +905,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
905
905
|
return this;
|
|
906
906
|
},
|
|
907
907
|
|
|
908
|
-
/**
|
|
909
|
-
* Shows the media player
|
|
910
|
-
* @returns {mediaplayer}
|
|
908
|
+
/**
|
|
909
|
+
* Shows the media player
|
|
910
|
+
* @returns {mediaplayer}
|
|
911
911
|
*/
|
|
912
912
|
show: function show() {
|
|
913
913
|
this._fromState('hidden');
|
|
@@ -915,9 +915,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
915
915
|
return this;
|
|
916
916
|
},
|
|
917
917
|
|
|
918
|
-
/**
|
|
919
|
-
* hides the media player
|
|
920
|
-
* @returns {mediaplayer}
|
|
918
|
+
/**
|
|
919
|
+
* hides the media player
|
|
920
|
+
* @returns {mediaplayer}
|
|
921
921
|
*/
|
|
922
922
|
hide: function hide() {
|
|
923
923
|
this._toState('hidden');
|
|
@@ -925,9 +925,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
925
925
|
return this;
|
|
926
926
|
},
|
|
927
927
|
|
|
928
|
-
/**
|
|
929
|
-
* get media original size
|
|
930
|
-
* @returns {Object}
|
|
928
|
+
/**
|
|
929
|
+
* get media original size
|
|
930
|
+
* @returns {Object}
|
|
931
931
|
*/
|
|
932
932
|
getMediaOriginalSize: function getMediaOriginalSize() {
|
|
933
933
|
if (this.is('youtube')) {
|
|
@@ -941,10 +941,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
941
941
|
return {};
|
|
942
942
|
},
|
|
943
943
|
|
|
944
|
-
/**
|
|
945
|
-
* Ensures the right media type is set
|
|
946
|
-
* @param {String} type
|
|
947
|
-
* @private
|
|
944
|
+
/**
|
|
945
|
+
* Ensures the right media type is set
|
|
946
|
+
* @param {String} type
|
|
947
|
+
* @private
|
|
948
948
|
*/
|
|
949
949
|
_setType: function _setType(type) {
|
|
950
950
|
if (type.indexOf('youtube') !== -1) {
|
|
@@ -956,9 +956,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
956
956
|
}
|
|
957
957
|
},
|
|
958
958
|
|
|
959
|
-
/**
|
|
960
|
-
* Ensures the type is correctly applied
|
|
961
|
-
* @private
|
|
959
|
+
/**
|
|
960
|
+
* Ensures the type is correctly applied
|
|
961
|
+
* @private
|
|
962
962
|
*/
|
|
963
963
|
_initType: function _initType() {
|
|
964
964
|
var is = this.config.is;
|
|
@@ -967,10 +967,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
967
967
|
is.audio = 'audio' === this.type;
|
|
968
968
|
},
|
|
969
969
|
|
|
970
|
-
/**
|
|
971
|
-
* Gets a source descriptor.
|
|
972
|
-
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
973
|
-
* @param {Function} callback - A function called to provide the media source object
|
|
970
|
+
/**
|
|
971
|
+
* Gets a source descriptor.
|
|
972
|
+
* @param {String|Object} src - The media URL, or an object containing the source and the type
|
|
973
|
+
* @param {Function} callback - A function called to provide the media source object
|
|
974
974
|
*/
|
|
975
975
|
_getSource: function _getSource(src, callback) {
|
|
976
976
|
var _this4 = this;
|
|
@@ -1015,10 +1015,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1015
1015
|
}
|
|
1016
1016
|
},
|
|
1017
1017
|
|
|
1018
|
-
/**
|
|
1019
|
-
* Ensures the sources are correctly set
|
|
1020
|
-
* @param {Function} callback - A function called once all sources have been initialized
|
|
1021
|
-
* @private
|
|
1018
|
+
/**
|
|
1019
|
+
* Ensures the sources are correctly set
|
|
1020
|
+
* @param {Function} callback - A function called once all sources have been initialized
|
|
1021
|
+
* @private
|
|
1022
1022
|
*/
|
|
1023
1023
|
_initSources: function _initSources(callback) {
|
|
1024
1024
|
var _this5 = this;
|
|
@@ -1032,9 +1032,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1032
1032
|
}, callback);
|
|
1033
1033
|
},
|
|
1034
1034
|
|
|
1035
|
-
/**
|
|
1036
|
-
* Installs the events manager onto the instance
|
|
1037
|
-
* @private
|
|
1035
|
+
/**
|
|
1036
|
+
* Installs the events manager onto the instance
|
|
1037
|
+
* @private
|
|
1038
1038
|
*/
|
|
1039
1039
|
_initEvents: function _initEvents() {
|
|
1040
1040
|
eventifier(this);
|
|
@@ -1055,9 +1055,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1055
1055
|
};
|
|
1056
1056
|
},
|
|
1057
1057
|
|
|
1058
|
-
/**
|
|
1059
|
-
* Ensures the right size is set according to the media type
|
|
1060
|
-
* @private
|
|
1058
|
+
/**
|
|
1059
|
+
* Ensures the right size is set according to the media type
|
|
1060
|
+
* @private
|
|
1061
1061
|
*/
|
|
1062
1062
|
_initSize: function _initSize() {
|
|
1063
1063
|
var type = this.is('video') ? 'video' : 'audio';
|
|
@@ -1072,9 +1072,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1072
1072
|
}
|
|
1073
1073
|
},
|
|
1074
1074
|
|
|
1075
|
-
/**
|
|
1076
|
-
* Initializes the right player instance
|
|
1077
|
-
* @private
|
|
1075
|
+
/**
|
|
1076
|
+
* Initializes the right player instance
|
|
1077
|
+
* @private
|
|
1078
1078
|
*/
|
|
1079
1079
|
_initPlayer: function _initPlayer() {
|
|
1080
1080
|
var _this6 = this;
|
|
@@ -1138,9 +1138,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1138
1138
|
}
|
|
1139
1139
|
},
|
|
1140
1140
|
|
|
1141
|
-
/**
|
|
1142
|
-
* Initializes the player state
|
|
1143
|
-
* @private
|
|
1141
|
+
/**
|
|
1142
|
+
* Initializes the player state
|
|
1143
|
+
* @private
|
|
1144
1144
|
*/
|
|
1145
1145
|
_initState: function _initState() {
|
|
1146
1146
|
var isCORS = false;
|
|
@@ -1158,9 +1158,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1158
1158
|
this._setState('ready', false);
|
|
1159
1159
|
},
|
|
1160
1160
|
|
|
1161
|
-
/**
|
|
1162
|
-
* Resets the internals attributes
|
|
1163
|
-
* @private
|
|
1161
|
+
/**
|
|
1162
|
+
* Resets the internals attributes
|
|
1163
|
+
* @private
|
|
1164
1164
|
*/
|
|
1165
1165
|
_reset: function _reset() {
|
|
1166
1166
|
this.config.is = {};
|
|
@@ -1189,9 +1189,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1189
1189
|
this.startMuted = this.config.startMuted;
|
|
1190
1190
|
},
|
|
1191
1191
|
|
|
1192
|
-
/**
|
|
1193
|
-
* Builds the DOM content
|
|
1194
|
-
* @private
|
|
1192
|
+
/**
|
|
1193
|
+
* Builds the DOM content
|
|
1194
|
+
* @private
|
|
1195
1195
|
*/
|
|
1196
1196
|
_buildDom: function _buildDom() {
|
|
1197
1197
|
var configForTemplate = _.clone(this.config);
|
|
@@ -1209,15 +1209,15 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1209
1209
|
this.$volumeSlider = this._renderSlider(this.$volume, this.volume, volumeMin, volumeMax, true);
|
|
1210
1210
|
},
|
|
1211
1211
|
|
|
1212
|
-
/**
|
|
1213
|
-
* Renders a slider onto an element
|
|
1214
|
-
* @param {jQuery} $elt - The element on which renders the slider
|
|
1215
|
-
* @param {Number} [value] - The current value of the slider
|
|
1216
|
-
* @param {Number} [min] - The min value of the slider
|
|
1217
|
-
* @param {Number} [max] - The max value of the slider
|
|
1218
|
-
* @param {Boolean} [vertical] - Tells if the slider must be vertical
|
|
1219
|
-
* @returns {jQuery} - Returns the element
|
|
1220
|
-
* @private
|
|
1212
|
+
/**
|
|
1213
|
+
* Renders a slider onto an element
|
|
1214
|
+
* @param {jQuery} $elt - The element on which renders the slider
|
|
1215
|
+
* @param {Number} [value] - The current value of the slider
|
|
1216
|
+
* @param {Number} [min] - The min value of the slider
|
|
1217
|
+
* @param {Number} [max] - The max value of the slider
|
|
1218
|
+
* @param {Boolean} [vertical] - Tells if the slider must be vertical
|
|
1219
|
+
* @returns {jQuery} - Returns the element
|
|
1220
|
+
* @private
|
|
1221
1221
|
*/
|
|
1222
1222
|
_renderSlider: function _renderSlider($elt, value, min, max, vertical) {
|
|
1223
1223
|
var orientation, direction;
|
|
@@ -1244,10 +1244,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1244
1244
|
});
|
|
1245
1245
|
},
|
|
1246
1246
|
|
|
1247
|
-
/**
|
|
1248
|
-
* Destroys a slider bound to an element
|
|
1249
|
-
* @param {jQuery} $elt
|
|
1250
|
-
* @private
|
|
1247
|
+
/**
|
|
1248
|
+
* Destroys a slider bound to an element
|
|
1249
|
+
* @param {jQuery} $elt
|
|
1250
|
+
* @private
|
|
1251
1251
|
*/
|
|
1252
1252
|
_destroySlider: function _destroySlider($elt) {
|
|
1253
1253
|
if ($elt) {
|
|
@@ -1255,9 +1255,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1255
1255
|
}
|
|
1256
1256
|
},
|
|
1257
1257
|
|
|
1258
|
-
/**
|
|
1259
|
-
* Binds events onto the rendered player
|
|
1260
|
-
* @private
|
|
1258
|
+
/**
|
|
1259
|
+
* Binds events onto the rendered player
|
|
1260
|
+
* @private
|
|
1261
1261
|
*/
|
|
1262
1262
|
_bindEvents: function _bindEvents() {
|
|
1263
1263
|
var _this7 = this;
|
|
@@ -1338,9 +1338,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1338
1338
|
});
|
|
1339
1339
|
},
|
|
1340
1340
|
|
|
1341
|
-
/**
|
|
1342
|
-
* Unbinds events from the rendered player
|
|
1343
|
-
* @private
|
|
1341
|
+
/**
|
|
1342
|
+
* Unbinds events from the rendered player
|
|
1343
|
+
* @private
|
|
1344
1344
|
*/
|
|
1345
1345
|
_unbindEvents: function _unbindEvents() {
|
|
1346
1346
|
this.$component.off(ns);
|
|
@@ -1357,10 +1357,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1357
1357
|
$$1(document).off(ns);
|
|
1358
1358
|
},
|
|
1359
1359
|
|
|
1360
|
-
/**
|
|
1361
|
-
* Updates the volume slider
|
|
1362
|
-
* @param {Number} value
|
|
1363
|
-
* @private
|
|
1360
|
+
/**
|
|
1361
|
+
* Updates the volume slider
|
|
1362
|
+
* @param {Number} value
|
|
1363
|
+
* @private
|
|
1364
1364
|
*/
|
|
1365
1365
|
_updateVolumeSlider: function _updateVolumeSlider(value) {
|
|
1366
1366
|
if (this.$volumeSlider) {
|
|
@@ -1368,11 +1368,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1368
1368
|
}
|
|
1369
1369
|
},
|
|
1370
1370
|
|
|
1371
|
-
/**
|
|
1372
|
-
* Updates the displayed volume
|
|
1373
|
-
* @param {Number} value
|
|
1374
|
-
* @param {*} [internal]
|
|
1375
|
-
* @private
|
|
1371
|
+
/**
|
|
1372
|
+
* Updates the displayed volume
|
|
1373
|
+
* @param {Number} value
|
|
1374
|
+
* @param {*} [internal]
|
|
1375
|
+
* @private
|
|
1376
1376
|
*/
|
|
1377
1377
|
_updateVolume: function _updateVolume(value, internal) {
|
|
1378
1378
|
this.volume = Math.max(volumeMin, Math.min(volumeMax, parseFloat(value)));
|
|
@@ -1384,10 +1384,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1384
1384
|
}
|
|
1385
1385
|
},
|
|
1386
1386
|
|
|
1387
|
-
/**
|
|
1388
|
-
* Updates the time slider
|
|
1389
|
-
* @param {Number} value
|
|
1390
|
-
* @private
|
|
1387
|
+
/**
|
|
1388
|
+
* Updates the time slider
|
|
1389
|
+
* @param {Number} value
|
|
1390
|
+
* @private
|
|
1391
1391
|
*/
|
|
1392
1392
|
_updatePositionSlider: function _updatePositionSlider(value) {
|
|
1393
1393
|
if (this.$seekSlider) {
|
|
@@ -1395,10 +1395,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1395
1395
|
}
|
|
1396
1396
|
},
|
|
1397
1397
|
|
|
1398
|
-
/**
|
|
1399
|
-
* Updates the time label
|
|
1400
|
-
* @param {Number} value
|
|
1401
|
-
* @private
|
|
1398
|
+
/**
|
|
1399
|
+
* Updates the time label
|
|
1400
|
+
* @param {Number} value
|
|
1401
|
+
* @private
|
|
1402
1402
|
*/
|
|
1403
1403
|
_updatePositionLabel: function _updatePositionLabel(value) {
|
|
1404
1404
|
if (this.$position) {
|
|
@@ -1406,11 +1406,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1406
1406
|
}
|
|
1407
1407
|
},
|
|
1408
1408
|
|
|
1409
|
-
/**
|
|
1410
|
-
* Updates the displayed time position
|
|
1411
|
-
* @param {Number} value
|
|
1412
|
-
* @param {*} [internal]
|
|
1413
|
-
* @private
|
|
1409
|
+
/**
|
|
1410
|
+
* Updates the displayed time position
|
|
1411
|
+
* @param {Number} value
|
|
1412
|
+
* @param {*} [internal]
|
|
1413
|
+
* @private
|
|
1414
1414
|
*/
|
|
1415
1415
|
_updatePosition: function _updatePosition(value, internal) {
|
|
1416
1416
|
this.position = Math.max(0, Math.min(this.duration || +Infinity, parseFloat(value)));
|
|
@@ -1422,10 +1422,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1422
1422
|
this._updatePositionLabel(this.position);
|
|
1423
1423
|
},
|
|
1424
1424
|
|
|
1425
|
-
/**
|
|
1426
|
-
* Updates the duration slider
|
|
1427
|
-
* @param {Number} value
|
|
1428
|
-
* @private
|
|
1425
|
+
/**
|
|
1426
|
+
* Updates the duration slider
|
|
1427
|
+
* @param {Number} value
|
|
1428
|
+
* @private
|
|
1429
1429
|
*/
|
|
1430
1430
|
_updateDurationSlider: function _updateDurationSlider(value) {
|
|
1431
1431
|
if (this.$seekSlider) {
|
|
@@ -1440,10 +1440,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1440
1440
|
}
|
|
1441
1441
|
},
|
|
1442
1442
|
|
|
1443
|
-
/**
|
|
1444
|
-
* Updates the duration label
|
|
1445
|
-
* @param {Number} value
|
|
1446
|
-
* @private
|
|
1443
|
+
/**
|
|
1444
|
+
* Updates the duration label
|
|
1445
|
+
* @param {Number} value
|
|
1446
|
+
* @private
|
|
1447
1447
|
*/
|
|
1448
1448
|
_updateDurationLabel: function _updateDurationLabel(value) {
|
|
1449
1449
|
if (this.$duration) {
|
|
@@ -1455,10 +1455,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1455
1455
|
}
|
|
1456
1456
|
},
|
|
1457
1457
|
|
|
1458
|
-
/**
|
|
1459
|
-
* Updates the displayed duration
|
|
1460
|
-
* @param {Number|String} value
|
|
1461
|
-
* @private
|
|
1458
|
+
/**
|
|
1459
|
+
* Updates the displayed duration
|
|
1460
|
+
* @param {Number|String} value
|
|
1461
|
+
* @private
|
|
1462
1462
|
*/
|
|
1463
1463
|
_updateDuration: function _updateDuration(value) {
|
|
1464
1464
|
var duration = Math.abs(parseFloat(value));
|
|
@@ -1472,9 +1472,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1472
1472
|
}
|
|
1473
1473
|
},
|
|
1474
1474
|
|
|
1475
|
-
/**
|
|
1476
|
-
* Event called when the media is ready
|
|
1477
|
-
* @private
|
|
1475
|
+
/**
|
|
1476
|
+
* Event called when the media is ready
|
|
1477
|
+
* @private
|
|
1478
1478
|
*/
|
|
1479
1479
|
_onReady: function _onReady() {
|
|
1480
1480
|
if (this.is('error')) {
|
|
@@ -1489,9 +1489,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1489
1489
|
}
|
|
1490
1490
|
|
|
1491
1491
|
this.setInitialStates();
|
|
1492
|
-
/**
|
|
1493
|
-
* Triggers a media ready event
|
|
1494
|
-
* @event mediaplayer#ready
|
|
1492
|
+
/**
|
|
1493
|
+
* Triggers a media ready event
|
|
1494
|
+
* @event mediaplayer#ready
|
|
1495
1495
|
*/
|
|
1496
1496
|
|
|
1497
1497
|
this.trigger('ready'); // set the initial state
|
|
@@ -1510,10 +1510,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1510
1510
|
}
|
|
1511
1511
|
},
|
|
1512
1512
|
|
|
1513
|
-
/**
|
|
1514
|
-
* Set max height limit for container
|
|
1515
|
-
* using by old media items with defined height.
|
|
1516
|
-
* @private
|
|
1513
|
+
/**
|
|
1514
|
+
* Set max height limit for container
|
|
1515
|
+
* using by old media items with defined height.
|
|
1516
|
+
* @private
|
|
1517
1517
|
*/
|
|
1518
1518
|
_setMaxHeight: function _setMaxHeight() {
|
|
1519
1519
|
var $video = this.$container.find('video.video');
|
|
@@ -1532,11 +1532,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1532
1532
|
}
|
|
1533
1533
|
},
|
|
1534
1534
|
|
|
1535
|
-
/**
|
|
1536
|
-
* Update volume in DBIndex store
|
|
1537
|
-
* @param {Number} volume
|
|
1538
|
-
* @returns {Promise}
|
|
1539
|
-
* @private
|
|
1535
|
+
/**
|
|
1536
|
+
* Update volume in DBIndex store
|
|
1537
|
+
* @param {Number} volume
|
|
1538
|
+
* @returns {Promise}
|
|
1539
|
+
* @private
|
|
1540
1540
|
*/
|
|
1541
1541
|
_storeVolume: function _storeVolume(volume) {
|
|
1542
1542
|
return store('mediaVolume').then(function (volumeStore) {
|
|
@@ -1544,10 +1544,10 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1544
1544
|
});
|
|
1545
1545
|
},
|
|
1546
1546
|
|
|
1547
|
-
/**
|
|
1548
|
-
* Get volume from DBIndex store
|
|
1549
|
-
* @returns {Promise}
|
|
1550
|
-
* @private
|
|
1547
|
+
/**
|
|
1548
|
+
* Get volume from DBIndex store
|
|
1549
|
+
* @returns {Promise}
|
|
1550
|
+
* @private
|
|
1551
1551
|
*/
|
|
1552
1552
|
_updateVolumeFromStore: function _updateVolumeFromStore() {
|
|
1553
1553
|
var _this8 = this;
|
|
@@ -1563,58 +1563,58 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1563
1563
|
});
|
|
1564
1564
|
},
|
|
1565
1565
|
|
|
1566
|
-
/**
|
|
1567
|
-
* Event called when the media throws unrecoverable error
|
|
1568
|
-
* @private
|
|
1566
|
+
/**
|
|
1567
|
+
* Event called when the media throws unrecoverable error
|
|
1568
|
+
* @private
|
|
1569
1569
|
*/
|
|
1570
1570
|
_onError: function _onError() {
|
|
1571
1571
|
this._setState('error', true);
|
|
1572
1572
|
|
|
1573
1573
|
this._setState('loading', false);
|
|
1574
|
-
/**
|
|
1575
|
-
* Triggers an unrecoverable media error event
|
|
1576
|
-
* @event mediaplayer#error
|
|
1574
|
+
/**
|
|
1575
|
+
* Triggers an unrecoverable media error event
|
|
1576
|
+
* @event mediaplayer#error
|
|
1577
1577
|
*/
|
|
1578
1578
|
|
|
1579
1579
|
|
|
1580
1580
|
this.trigger('error');
|
|
1581
1581
|
},
|
|
1582
1582
|
|
|
1583
|
-
/**
|
|
1584
|
-
* Event called when the media is played
|
|
1585
|
-
* @private
|
|
1583
|
+
/**
|
|
1584
|
+
* Event called when the media is played
|
|
1585
|
+
* @private
|
|
1586
1586
|
*/
|
|
1587
1587
|
_onPlay: function _onPlay() {
|
|
1588
1588
|
this._playingState(true);
|
|
1589
1589
|
|
|
1590
1590
|
this._setState('preview', true);
|
|
1591
|
-
/**
|
|
1592
|
-
* Triggers a media playback event
|
|
1593
|
-
* @event mediaplayer#play
|
|
1591
|
+
/**
|
|
1592
|
+
* Triggers a media playback event
|
|
1593
|
+
* @event mediaplayer#play
|
|
1594
1594
|
*/
|
|
1595
1595
|
|
|
1596
1596
|
|
|
1597
1597
|
this.trigger('play', this.player && this.player.getMedia());
|
|
1598
1598
|
},
|
|
1599
1599
|
|
|
1600
|
-
/**
|
|
1601
|
-
* Event called when the media is paused
|
|
1602
|
-
* @private
|
|
1600
|
+
/**
|
|
1601
|
+
* Event called when the media is paused
|
|
1602
|
+
* @private
|
|
1603
1603
|
*/
|
|
1604
1604
|
_onPause: function _onPause() {
|
|
1605
1605
|
this._playingState(false);
|
|
1606
|
-
/**
|
|
1607
|
-
* Triggers a media paused event
|
|
1608
|
-
* @event mediaplayer#pause
|
|
1606
|
+
/**
|
|
1607
|
+
* Triggers a media paused event
|
|
1608
|
+
* @event mediaplayer#pause
|
|
1609
1609
|
*/
|
|
1610
1610
|
|
|
1611
1611
|
|
|
1612
1612
|
this.trigger('pause');
|
|
1613
1613
|
},
|
|
1614
1614
|
|
|
1615
|
-
/**
|
|
1616
|
-
* Event called when the media is ended
|
|
1617
|
-
* @private
|
|
1615
|
+
/**
|
|
1616
|
+
* Event called when the media is ended
|
|
1617
|
+
* @private
|
|
1618
1618
|
*/
|
|
1619
1619
|
_onEnd: function _onEnd() {
|
|
1620
1620
|
this.timesPlayed++;
|
|
@@ -1628,9 +1628,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1628
1628
|
if (!this.is('disabled')) {
|
|
1629
1629
|
this.disable();
|
|
1630
1630
|
}
|
|
1631
|
-
/**
|
|
1632
|
-
* Triggers a play limit reached event
|
|
1633
|
-
* @event mediaplayer#limitreached
|
|
1631
|
+
/**
|
|
1632
|
+
* Triggers a play limit reached event
|
|
1633
|
+
* @event mediaplayer#limitreached
|
|
1634
1634
|
*/
|
|
1635
1635
|
|
|
1636
1636
|
|
|
@@ -1642,18 +1642,18 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1642
1642
|
|
|
1643
1643
|
this._replayTimeout();
|
|
1644
1644
|
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Triggers a media ended event
|
|
1647
|
-
* @event mediaplayer#ended
|
|
1645
|
+
/**
|
|
1646
|
+
* Triggers a media ended event
|
|
1647
|
+
* @event mediaplayer#ended
|
|
1648
1648
|
*/
|
|
1649
1649
|
|
|
1650
1650
|
|
|
1651
1651
|
this.trigger('ended');
|
|
1652
1652
|
},
|
|
1653
1653
|
|
|
1654
|
-
/**
|
|
1655
|
-
* Event called when the playback is playing
|
|
1656
|
-
* @private
|
|
1654
|
+
/**
|
|
1655
|
+
* Event called when the playback is playing
|
|
1656
|
+
* @private
|
|
1657
1657
|
*/
|
|
1658
1658
|
_onPlaying: function _onPlaying() {
|
|
1659
1659
|
this._setState('preview', true);
|
|
@@ -1663,9 +1663,9 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1663
1663
|
this._setState('ready', true);
|
|
1664
1664
|
},
|
|
1665
1665
|
|
|
1666
|
-
/**
|
|
1667
|
-
* Event called when the playback is stalled
|
|
1668
|
-
* @private
|
|
1666
|
+
/**
|
|
1667
|
+
* Event called when the playback is stalled
|
|
1668
|
+
* @private
|
|
1669
1669
|
*/
|
|
1670
1670
|
_onStalled: function _onStalled() {
|
|
1671
1671
|
this._setState('stalled', true);
|
|
@@ -1673,24 +1673,24 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1673
1673
|
this._setState('ready', false);
|
|
1674
1674
|
},
|
|
1675
1675
|
|
|
1676
|
-
/**
|
|
1677
|
-
* Event called when the time position has changed
|
|
1678
|
-
* @private
|
|
1676
|
+
/**
|
|
1677
|
+
* Event called when the time position has changed
|
|
1678
|
+
* @private
|
|
1679
1679
|
*/
|
|
1680
1680
|
_onTimeUpdate: function _onTimeUpdate() {
|
|
1681
1681
|
this._updatePosition(this.player.getPosition());
|
|
1682
|
-
/**
|
|
1683
|
-
* Triggers a media time update event
|
|
1684
|
-
* @event mediaplayer#update
|
|
1682
|
+
/**
|
|
1683
|
+
* Triggers a media time update event
|
|
1684
|
+
* @event mediaplayer#update
|
|
1685
1685
|
*/
|
|
1686
1686
|
|
|
1687
1687
|
|
|
1688
1688
|
this.trigger('update');
|
|
1689
1689
|
},
|
|
1690
1690
|
|
|
1691
|
-
/**
|
|
1692
|
-
* Run a timer to disable the possibility of replaying a media
|
|
1693
|
-
* @private
|
|
1691
|
+
/**
|
|
1692
|
+
* Run a timer to disable the possibility of replaying a media
|
|
1693
|
+
* @private
|
|
1694
1694
|
*/
|
|
1695
1695
|
_replayTimeout: function _replayTimeout() {
|
|
1696
1696
|
var nowMs = new window.Date().getTime(),
|
|
@@ -1703,56 +1703,56 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1703
1703
|
}
|
|
1704
1704
|
},
|
|
1705
1705
|
|
|
1706
|
-
/**
|
|
1707
|
-
* Checks if the play limit has been reached
|
|
1708
|
-
* @returns {Boolean}
|
|
1709
|
-
* @private
|
|
1706
|
+
/**
|
|
1707
|
+
* Checks if the play limit has been reached
|
|
1708
|
+
* @returns {Boolean}
|
|
1709
|
+
* @private
|
|
1710
1710
|
*/
|
|
1711
1711
|
_playLimitReached: function _playLimitReached() {
|
|
1712
1712
|
return this.config.maxPlays && this.timesPlayed >= this.config.maxPlays;
|
|
1713
1713
|
},
|
|
1714
1714
|
|
|
1715
|
-
/**
|
|
1716
|
-
* Checks if the media can be played
|
|
1717
|
-
* @returns {Boolean}
|
|
1718
|
-
* @private
|
|
1715
|
+
/**
|
|
1716
|
+
* Checks if the media can be played
|
|
1717
|
+
* @returns {Boolean}
|
|
1718
|
+
* @private
|
|
1719
1719
|
*/
|
|
1720
1720
|
_canPlay: function _canPlay() {
|
|
1721
1721
|
return (this.is('ready') || this.is('stalled')) && !this.is('disabled') && !this.is('hidden') && !this._playLimitReached();
|
|
1722
1722
|
},
|
|
1723
1723
|
|
|
1724
|
-
/**
|
|
1725
|
-
* Checks if the media can be paused
|
|
1726
|
-
* @returns {Boolean}
|
|
1727
|
-
* @private
|
|
1724
|
+
/**
|
|
1725
|
+
* Checks if the media can be paused
|
|
1726
|
+
* @returns {Boolean}
|
|
1727
|
+
* @private
|
|
1728
1728
|
*/
|
|
1729
1729
|
_canPause: function _canPause() {
|
|
1730
1730
|
return !!this.config.canPause;
|
|
1731
1731
|
},
|
|
1732
1732
|
|
|
1733
|
-
/**
|
|
1734
|
-
* Checks if the media can be sought
|
|
1735
|
-
* @returns {Boolean}
|
|
1736
|
-
* @private
|
|
1733
|
+
/**
|
|
1734
|
+
* Checks if the media can be sought
|
|
1735
|
+
* @returns {Boolean}
|
|
1736
|
+
* @private
|
|
1737
1737
|
*/
|
|
1738
1738
|
_canSeek: function _canSeek() {
|
|
1739
1739
|
return !!this.config.canSeek;
|
|
1740
1740
|
},
|
|
1741
1741
|
|
|
1742
|
-
/**
|
|
1743
|
-
* Checks if the playback can be resumed
|
|
1744
|
-
* @returns {Boolean}
|
|
1745
|
-
* @private
|
|
1742
|
+
/**
|
|
1743
|
+
* Checks if the playback can be resumed
|
|
1744
|
+
* @returns {Boolean}
|
|
1745
|
+
* @private
|
|
1746
1746
|
*/
|
|
1747
1747
|
_canResume: function _canResume() {
|
|
1748
1748
|
return this.is('paused') && this._canPlay();
|
|
1749
1749
|
},
|
|
1750
1750
|
|
|
1751
|
-
/**
|
|
1752
|
-
* Sets the media is in a particular state
|
|
1753
|
-
* @param {String} name
|
|
1754
|
-
* @param {Boolean} value
|
|
1755
|
-
* @returns {mediaplayer}
|
|
1751
|
+
/**
|
|
1752
|
+
* Sets the media is in a particular state
|
|
1753
|
+
* @param {String} name
|
|
1754
|
+
* @param {Boolean} value
|
|
1755
|
+
* @returns {mediaplayer}
|
|
1756
1756
|
*/
|
|
1757
1757
|
_setState: function _setState(name, value) {
|
|
1758
1758
|
value = !!value;
|
|
@@ -1765,11 +1765,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1765
1765
|
return this;
|
|
1766
1766
|
},
|
|
1767
1767
|
|
|
1768
|
-
/**
|
|
1769
|
-
* Restores the media player from a particular state and resumes the playback
|
|
1770
|
-
* @param {String} stateName
|
|
1771
|
-
* @returns {mediaplayer}
|
|
1772
|
-
* @private
|
|
1768
|
+
/**
|
|
1769
|
+
* Restores the media player from a particular state and resumes the playback
|
|
1770
|
+
* @param {String} stateName
|
|
1771
|
+
* @returns {mediaplayer}
|
|
1772
|
+
* @private
|
|
1773
1773
|
*/
|
|
1774
1774
|
_fromState: function _fromState(stateName) {
|
|
1775
1775
|
this._setState(stateName, false);
|
|
@@ -1778,11 +1778,11 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1778
1778
|
return this;
|
|
1779
1779
|
},
|
|
1780
1780
|
|
|
1781
|
-
/**
|
|
1782
|
-
* Sets the media player to a particular state and pauses the playback
|
|
1783
|
-
* @param {String} stateName
|
|
1784
|
-
* @returns {mediaplayer}
|
|
1785
|
-
* @private
|
|
1781
|
+
/**
|
|
1782
|
+
* Sets the media player to a particular state and pauses the playback
|
|
1783
|
+
* @param {String} stateName
|
|
1784
|
+
* @returns {mediaplayer}
|
|
1785
|
+
* @private
|
|
1786
1786
|
*/
|
|
1787
1787
|
_toState: function _toState(stateName) {
|
|
1788
1788
|
this.pause();
|
|
@@ -1792,12 +1792,12 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1792
1792
|
return this;
|
|
1793
1793
|
},
|
|
1794
1794
|
|
|
1795
|
-
/**
|
|
1796
|
-
* Sets the playing state
|
|
1797
|
-
* @param {Boolean} state
|
|
1798
|
-
* @param {Boolean} [ended]
|
|
1799
|
-
* @returns {mediaplayer}
|
|
1800
|
-
* @private
|
|
1795
|
+
/**
|
|
1796
|
+
* Sets the playing state
|
|
1797
|
+
* @param {Boolean} state
|
|
1798
|
+
* @param {Boolean} [ended]
|
|
1799
|
+
* @returns {mediaplayer}
|
|
1800
|
+
* @private
|
|
1801
1801
|
*/
|
|
1802
1802
|
_playingState: function _playingState(state, ended) {
|
|
1803
1803
|
this._setState('playing', !!state);
|
|
@@ -1809,12 +1809,12 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1809
1809
|
return this;
|
|
1810
1810
|
},
|
|
1811
1811
|
|
|
1812
|
-
/**
|
|
1813
|
-
* Executes a command onto the media
|
|
1814
|
-
* @param {String} command - The name of the command to execute
|
|
1815
|
-
* @param {*} args - additional arguments
|
|
1816
|
-
* @returns {*}
|
|
1817
|
-
* @private
|
|
1812
|
+
/**
|
|
1813
|
+
* Executes a command onto the media
|
|
1814
|
+
* @param {String} command - The name of the command to execute
|
|
1815
|
+
* @param {*} args - additional arguments
|
|
1816
|
+
* @returns {*}
|
|
1817
|
+
* @private
|
|
1818
1818
|
*/
|
|
1819
1819
|
execute: function execute(command) {
|
|
1820
1820
|
if (this.player && 'function' === typeof this.player[command]) {
|
|
@@ -1830,40 +1830,40 @@ define(['jquery', 'lodash', 'async', 'util/urlParser', 'core/eventifier', 'core/
|
|
|
1830
1830
|
};
|
|
1831
1831
|
return mediaplayer.init(config);
|
|
1832
1832
|
}
|
|
1833
|
-
/**
|
|
1834
|
-
* Tells if the browser can play audio and video
|
|
1835
|
-
* @param {String} [type] The type of media (audio or video)
|
|
1836
|
-
* @param {String} [mime] A media MIME type to check
|
|
1837
|
-
* @type {Boolean}
|
|
1833
|
+
/**
|
|
1834
|
+
* Tells if the browser can play audio and video
|
|
1835
|
+
* @param {String} [type] The type of media (audio or video)
|
|
1836
|
+
* @param {String} [mime] A media MIME type to check
|
|
1837
|
+
* @type {Boolean}
|
|
1838
1838
|
*/
|
|
1839
1839
|
|
|
1840
1840
|
|
|
1841
1841
|
mediaplayerFactory.canPlay = function canPlay(type, mime) {
|
|
1842
1842
|
return support.canPlay(type, mime);
|
|
1843
1843
|
};
|
|
1844
|
-
/**
|
|
1845
|
-
* Tells if the browser can play audio
|
|
1846
|
-
* @param {String} [mime] A media MIME type to check
|
|
1847
|
-
* @type {Boolean}
|
|
1844
|
+
/**
|
|
1845
|
+
* Tells if the browser can play audio
|
|
1846
|
+
* @param {String} [mime] A media MIME type to check
|
|
1847
|
+
* @type {Boolean}
|
|
1848
1848
|
*/
|
|
1849
1849
|
|
|
1850
1850
|
|
|
1851
1851
|
mediaplayerFactory.canPlayAudio = function canPlayAudio(mime) {
|
|
1852
1852
|
return support.canPlayAudio(mime);
|
|
1853
1853
|
};
|
|
1854
|
-
/**
|
|
1855
|
-
* Tells if the browser can play video
|
|
1856
|
-
* @param {String} [mime] A media MIME type to check
|
|
1857
|
-
* @type {Boolean}
|
|
1854
|
+
/**
|
|
1855
|
+
* Tells if the browser can play video
|
|
1856
|
+
* @param {String} [mime] A media MIME type to check
|
|
1857
|
+
* @type {Boolean}
|
|
1858
1858
|
*/
|
|
1859
1859
|
|
|
1860
1860
|
|
|
1861
1861
|
mediaplayerFactory.canPlayVideo = function canPlayVideo(mime) {
|
|
1862
1862
|
return support.canPlayVideo(mime);
|
|
1863
1863
|
};
|
|
1864
|
-
/**
|
|
1865
|
-
* Checks if the browser allows to control the media playback
|
|
1866
|
-
* @returns {Boolean}
|
|
1864
|
+
/**
|
|
1865
|
+
* Checks if the browser allows to control the media playback
|
|
1866
|
+
* @returns {Boolean}
|
|
1867
1867
|
*/
|
|
1868
1868
|
|
|
1869
1869
|
|