Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
edx-platform
Commits
467e7ece
Commit
467e7ece
authored
Sep 26, 2017
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! WIP: Added Chromecast support to video XModule
parent
8267597b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
40 deletions
+2
-40
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
+0
-0
lms/templates/video.html
+2
-40
No files found.
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
View file @
467e7ece
This diff is collapsed.
Click to expand it.
lms/templates/video.html
View file @
467e7ece
...
@@ -17,6 +17,8 @@ from openedx.core.djangolib.js_utils import js_escaped_string
...
@@ -17,6 +17,8 @@ from openedx.core.djangolib.js_utils import js_escaped_string
tabindex=
"-1"
tabindex=
"-1"
>
>
<div
class=
"focus_grabber first"
></div>
<div
class=
"focus_grabber first"
></div>
<!-- TODO Integrate into video player UI -->
<script
type=
"text/javascript"
src=
"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"
></script>
<button
is=
"google-cast-button"
></button>
<button
is=
"google-cast-button"
></button>
<div
class=
"tc-wrapper"
>
<div
class=
"tc-wrapper"
>
<div
class=
"video-wrapper"
>
<div
class=
"video-wrapper"
>
...
@@ -87,46 +89,6 @@ from openedx.core.djangolib.js_utils import js_escaped_string
...
@@ -87,46 +89,6 @@ from openedx.core.djangolib.js_utils import js_escaped_string
% endif
% endif
</div>
</div>
<!-- BEGIN Chromecast -->
<script
type=
"text/javascript"
src=
"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"
></script>
<script>
window
[
'__onGCastApiAvailable'
]
=
function
(
isAvailable
)
{
initializeCastApi
=
function
()
{
cast
.
framework
.
CastContext
.
getInstance
().
setOptions
({
receiverApplicationId
:
chrome
.
cast
.
media
.
DEFAULT_MEDIA_RECEIVER_APP_ID
,
autoJoinPolicy
:
chrome
.
cast
.
AutoJoinPolicy
.
ORIGIN_SCOPED
});
};
if
(
isAvailable
)
{
initializeCastApi
();
$
(
'button.video_control.play'
).
on
(
'click'
,
function
()
{
var
castSession
=
cast
.
framework
.
CastContext
.
getInstance
().
getCurrentSession
();
var
mediaInfo
=
new
chrome
.
cast
.
media
.
MediaInfo
(
'https://d2f1egay8yehza.cloudfront.net/BERGG101/BERGG101T314-V011300_DTH.mp4'
,
'video/mp4t'
);
var
request
=
new
chrome
.
cast
.
media
.
LoadRequest
(
mediaInfo
);
castSession
.
loadMedia
(
request
).
then
(
function
()
{
console
.
log
(
'Load succeed'
);
},
function
(
errorCode
)
{
console
.
log
(
'Error code: '
+
errorCode
);
});
});
/*var castSession = cast.framework.CastContext.getInstance().getCurrentSession();
var mediaInfo = new chrome.cast.media.MediaInfo('CCxmtcICYNc', 'yt');
var request = new chrome.cast.media.LoadRequest(mediaInfo);
castSession.loadMedia(request).then(
function () {
console.log('Load succeed');
},
function (errorCode) {
console.log('Error code: ' + errorCode);
});*/
}
};
</script>
<!-- END Chromecast -->
% if cdn_eval:
% if cdn_eval:
<script>
<script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment