1 DEFAULT_ERROR = 'You are currently connected via HTTPS but the embedded content
2 uses non-secure plain HTTP. Your browser therefore blocks it from
3 loading due to mixed content policy. To fix this, embed the video using a
4 secure link if available (https://...), or find another source for the content.'
6 genParam = (name, value) ->
12 window.EmbedPlayer = class EmbedPlayer extends Player
13 constructor: (data) ->
14 if not (this instanceof EmbedPlayer)
15 return new EmbedPlayer(data)
20 @setMediaProperties(data)
22 embed = data.meta.embed
24 console.error('EmbedPlayer::load(): missing meta.embed')
27 @player = @loadIframe(embed)
31 loadIframe: (embed) ->
32 if embed.src.indexOf('http:') == 0 and location.protocol == 'https:'
33 if @__proto__.mixedContentError?
34 error = @__proto__.mixedContentError
37 alert = makeAlert('Mixed Content Error', error, 'alert-danger')
38 .removeClass('col-md-12')
39 alert.find('.close').remove()
42 iframe = $('<iframe/>').attr(