mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 10:06:08 -05:00
Remove the scheme from help videos so that they maintain the scheme of the
calling page
This commit is contained in:
parent
03093fc4a5
commit
30f9188090
1 changed files with 10 additions and 1 deletions
|
@ -94,9 +94,18 @@ module.exports = class LevelGuideView extends CocoView
|
||||||
window.tracker?.trackEvent 'Finish help video', level: @levelID, ls: @sessionID, style: @helpVideos[@helpVideosIndex].style
|
window.tracker?.trackEvent 'Finish help video', level: @levelID, ls: @sessionID, style: @helpVideos[@helpVideosIndex].style
|
||||||
@trackedHelpVideoFinish = true
|
@trackedHelpVideoFinish = true
|
||||||
|
|
||||||
|
# we wan't to always use the same scheme (HTTP/HTTPS) as the page was loaded with, but don't want to require Artisans to have to remember
|
||||||
|
# not to include a scheme in help video url
|
||||||
|
fixupUri = (uri) ->
|
||||||
|
n = uri.indexOf('/')
|
||||||
|
if n < 1
|
||||||
|
return uri
|
||||||
|
return uri.slice(n)
|
||||||
|
|
||||||
setupVideoPlayer: () ->
|
setupVideoPlayer: () ->
|
||||||
return unless @helpVideos.length > 0
|
return unless @helpVideos.length > 0
|
||||||
helpVideoURL = @helpVideos[@helpVideosIndex].url
|
console.log(@helpVideos[@helpVideosIndex].url)
|
||||||
|
helpVideoURL = fixupUri(@helpVideos[@helpVideosIndex].url)
|
||||||
@setupVimeoVideoPlayer helpVideoURL
|
@setupVimeoVideoPlayer helpVideoURL
|
||||||
|
|
||||||
setupVimeoVideoPlayer: (helpVideoURL) ->
|
setupVimeoVideoPlayer: (helpVideoURL) ->
|
||||||
|
|
Loading…
Reference in a new issue