A feature flag to toggle html5/flash first video playback
this is a simple feature flag that will let us toggle between: a. trying html5 first then falling back to flash if not enabled or trying flash first. b. trying flash first, then falling back to html5 if unavailable. test plan: 1. with feature flag not turned on, watch a video. it should use flash to play it. 2. turn on the feature flag for domain_root_account 3. watch a video, it should use html5 Change-Id: I08aab043f89d049863dcbbd49aa1c4fcd8dc2895 Reviewed-on: https://gerrit.instructure.com/34248 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: David Julia <djulia@pivotallabs.com> Reviewed-by: Paul Hinze <paulh@instructure.com> Product-Review: Ben Hutchings <benh@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com>
This commit is contained in:
parent
2b718dbd05
commit
afc1150b7b
|
@ -20,6 +20,11 @@ define [
|
|||
# default if the <video height> is not specified
|
||||
defaultVideoHeight: VIDEO_HEIGHT
|
||||
|
||||
unless INST.enableHtml5FirstVideos
|
||||
# prefer flash player, as it works more consistently
|
||||
# for now, but allow fallback to html5 (like on mobile)
|
||||
mejs.MepDefaults.mode = 'auto_plugin'
|
||||
|
||||
mejs.MepDefaults.success = (mediaElement, domObject) ->
|
||||
kalturaAnalytics(this.mediaCommentId, mediaElement, INST.kalturaSettings)
|
||||
mediaElement.play()
|
||||
|
|
|
@ -484,6 +484,7 @@ module ApplicationHelper
|
|||
:disableScribdPreviews => !feature_enabled?(:scribd),
|
||||
:disableCrocodocPreviews => !feature_enabled?(:crocodoc),
|
||||
:enableScribdHtml5 => feature_enabled?(:scribd_html5),
|
||||
:enableHtml5FirstVideos => @domain_root_account.feature_enabled?(:html5_first_videos),
|
||||
:logPageViews => !@body_class_no_headers,
|
||||
:maxVisibleEditorButtons => 3,
|
||||
:editorButtons => editor_buttons,
|
||||
|
|
|
@ -109,6 +109,18 @@ END
|
|||
description: -> { I18n.t('new_styles_description', <<-END) },
|
||||
We are working on a UI facelift to Canvas. Turn this on to opt-in to seeing the
|
||||
updated, simplified look and feel of the Canvas interface.
|
||||
END
|
||||
applies_to: 'RootAccount',
|
||||
state: 'allowed',
|
||||
beta: true,
|
||||
development: true
|
||||
},
|
||||
'html5_first_videos' =>
|
||||
{
|
||||
display_name: -> { I18n.t('features.html5_first_videos', 'Prefer HTML5 for video playback') },
|
||||
description: -> { I18n.t('html5_first_videos_description', <<-END) },
|
||||
By default, Canvas will try to use Flash first to play videos. Turn this on to try using HTML5 first,
|
||||
then fall back to Flash.
|
||||
END
|
||||
applies_to: 'RootAccount',
|
||||
state: 'allowed',
|
||||
|
|
Loading…
Reference in New Issue