Sha256: a593518bdc7df07f4b7b2f8835e7d12b9d8c48203cbc09c7d8fd662248973ea3
Contents?: true
Size: 1.04 KB
Versions: 68
Compression:
Stored size: 1.04 KB
Contents
window.mediaAccessCreate = function (mediaType, mediaLink, slideId) { var postPath = "/participants/media_access_events" $('.jp-play').on("click", function (){ $.ajax({ type: "POST", url: postPath, data: { media_access_event: { media_type: mediaType, media_link: mediaLink, bit_core_slide_id: slideId }} }). done(function(data) { bindStopEvent(data.media_access_event_id); bindEndedEvent(data.media_access_event_id); }); }); } window.mediaAccessUpdate = function(mediaAccessEventId) { var putPath = "/participants/media_access_events/"+mediaAccessEventId $.ajax({ type: "PUT", url: putPath, data: { media_access_event: { id: mediaAccessEventId, end_time: new Date() }} }); } window.bindStopEvent = function (mediaAccessEventId) { $('.jp-stop').on("click", function() { mediaAccessUpdate(mediaAccessEventId); }); } window.bindEndedEvent = function (mediaAccessEventId) { $("#jquery_jplayer_1").bind($.jPlayer.event.ended, function(){ mediaAccessUpdate(mediaAccessEventId); }); }
Version data entries
68 entries across 68 versions & 1 rubygems