From 7c897d91dbf9f9c7444136804c6bdc1f2772e86a Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Mon, 21 Aug 2017 20:06:07 -0700 Subject: [PATCH] Add crossorigin attribute for custom media with text tracks Mitigates #702 --- player/videojs.coffee | 9 ++++++++- www/js/player.js | 10 +++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/player/videojs.coffee b/player/videojs.coffee index 5e99339e..8c5ac3c2 100644 --- a/player/videojs.coffee +++ b/player/videojs.coffee @@ -47,9 +47,16 @@ window.VideoJSPlayer = class VideoJSPlayer extends Player loadPlayer: (data) -> waitUntilDefined(window, 'videojs', => + attrs = + width: '100%' + height: '100%' + + if @mediaType == 'cm' and data.meta.textTracks + attrs.crossorigin = 'anonymous' + video = $('