mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-05-05 20:23:26 -04:00
a
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
VERSION = "8.9995"
|
VERSION = "8.9996"
|
||||||
|
|||||||
@@ -261,11 +261,21 @@
|
|||||||
var baseUrl = window.location.origin;
|
var baseUrl = window.location.origin;
|
||||||
var embedUrl = baseUrl + '/embed?m=' + mediaId;
|
var embedUrl = baseUrl + '/embed?m=' + mediaId;
|
||||||
|
|
||||||
window.parent.postMessage({
|
var sendPostMsg = function() {
|
||||||
type: 'videoSelected',
|
window.parent.postMessage({
|
||||||
embedUrl: embedUrl,
|
type: 'videoSelected',
|
||||||
videoId: mediaId
|
embedUrl: embedUrl,
|
||||||
}, '*');
|
videoId: mediaId
|
||||||
|
}, '*');
|
||||||
|
};
|
||||||
|
|
||||||
|
fetch('/api/v1/media/' + mediaId + '/share', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'X-CSRFToken': getCSRFToken(),
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
},
|
||||||
|
}).then(sendPostMsg).catch(sendPostMsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setTimeout(function(){ window.location.href = response.media_url; }, 500);
|
setTimeout(function(){ window.location.href = response.media_url; }, 500);
|
||||||
|
|||||||
Reference in New Issue
Block a user