Skip to content
Snippets Groups Projects
Commit 9f4eccb7 authored by Frode Petterson's avatar Frode Petterson
Browse files

JI-1927 Add Panopto mime type support in video widget

parent 66c4923d
No related branches found
No related tags found
No related merge requests found
......@@ -673,11 +673,18 @@ H5PEditor.widgets.video = H5PEditor.widgets.audio = H5PEditor.AV = (function ($)
* Providers incase mime type is unknown.
* @public
*/
C.providers = [{
C.providers = [
{
name: 'YouTube',
regexp: /(?:https?:\/\/)?(?:www\.)?(?:(?:youtube.com\/(?:attribution_link\?(?:\S+))?(?:v\/|embed\/|watch\/|(?:user\/(?:\S+)\/)?watch(?:\S+)v\=))|(?:youtu.be\/|y2u.be\/))([A-Za-z0-9_-]{11})/i,
aspectRatio: '16:9',
}];
},
{
name: 'Panopto',
regexp: /^[^\/]+:\/\/([^\/]*panopto\.[^\/]+)\/Panopto\/.+\?id=(.+)$/i,
aspectRatio: '16:9',
}
];
// Avoid ID attribute collisions
let idCounter = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment