mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-04-23 15:58:08 -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 embedUrl = baseUrl + '/embed?m=' + mediaId;
|
||||
|
||||
window.parent.postMessage({
|
||||
type: 'videoSelected',
|
||||
embedUrl: embedUrl,
|
||||
videoId: mediaId
|
||||
}, '*');
|
||||
var sendPostMsg = function() {
|
||||
window.parent.postMessage({
|
||||
type: 'videoSelected',
|
||||
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;
|
||||
}
|
||||
setTimeout(function(){ window.location.href = response.media_url; }, 500);
|
||||
|
||||
Reference in New Issue
Block a user