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
Branches
No related tags found
No related merge requests found
...@@ -673,11 +673,18 @@ H5PEditor.widgets.video = H5PEditor.widgets.audio = H5PEditor.AV = (function ($) ...@@ -673,11 +673,18 @@ H5PEditor.widgets.video = H5PEditor.widgets.audio = H5PEditor.AV = (function ($)
* Providers incase mime type is unknown. * Providers incase mime type is unknown.
* @public * @public
*/ */
C.providers = [{ C.providers = [
{
name: 'YouTube', 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, 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', aspectRatio: '16:9',
}]; },
{
name: 'Panopto',
regexp: /^[^\/]+:\/\/([^\/]*panopto\.[^\/]+)\/Panopto\/.+\?id=(.+)$/i,
aspectRatio: '16:9',
}
];
// Avoid ID attribute collisions // Avoid ID attribute collisions
let idCounter = 0; let idCounter = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment