MDL-78428 tiny_media: Deprecated unused langs and templates
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
define("tiny_media/selectors",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={IMAGE:{actions:{submit:".tiny_image_urlentrysubmit",imageBrowser:".openimagebrowser",addUrl:".tiny_image_addurl",deleteImage:".tiny_image_deleteicon"},elements:{form:"form.tiny_image_form",alignSettings:".tiny_image_button",alt:".tiny_image_altentry",altWarning:".tiny_image_altwarning",height:".tiny_image_heightentry",width:".tiny_image_widthentry",url:".tiny_image_urlentry",urlWarning:".tiny_image_urlwarning",size:".tiny_image_size",presentation:".tiny_image_presentation",constrain:".tiny_image_constrain",customStyle:".tiny_image_customstyle",preview:".tiny_image_preview",previewBox:".tiny_image_preview_box",loaderIcon:".tiny_image_loader",loaderIconContainer:".tiny_image_loader_container",insertImage:".tiny_image_insert_image",modalFooter:".modal-footer",dropzoneContainer:".tiny_image_dropzone_container",fileInput:"#tiny_image_fileinput",fileNameLabel:".tiny_image_filename",sizeOriginal:".tiny_image_sizeoriginal",sizeCustom:".tiny_image_sizecustom",properties:".tiny_image_properties"},styles:{responsive:"img-fluid"}},EMBED:{actions:{submit:".tiny_media_submit",mediaBrowser:".openmediabrowser"},elements:{form:"form.tiny_media_form",source:".tiny_media_source",track:".tiny_media_track",mediaSource:".tiny_media_media_source",linkSource:".tiny_media_link_source",linkSize:".tiny_media_link_size",posterSource:".tiny_media_poster_source",posterSize:".tiny_media_poster_size",displayOptions:".tiny_media_display_options",name:".tiny_media_name_entry",title:".tiny_media_title_entry",url:".tiny_media_url_entry",width:".tiny_media_width_entry",height:".tiny_media_height_entry",trackSource:".tiny_media_track_source",trackKind:".tiny_media_track_kind_entry",trackLabel:".tiny_media_track_label_entry",trackLang:".tiny_media_track_lang_entry",trackDefault:".tiny_media_track_default",mediaControl:".tiny_media_controls",mediaAutoplay:".tiny_media_autoplay",mediaMute:".tiny_media_mute",mediaLoop:".tiny_media_loop",advancedSettings:".tiny_media_advancedsettings",linkTab:'li[data-medium-type="link"]',videoTab:'li[data-medium-type="video"]',audioTab:'li[data-medium-type="audio"]',linkPane:'.tab-pane[data-medium-type="link"]',videoPane:'.tab-pane[data-medium-type="video"]',audioPane:'.tab-pane[data-medium-type="audio"]',trackSubtitlesTab:'li[data-track-kind="subtitles"]',trackCaptionsTab:'li[data-track-kind="captions"]',trackDescriptionsTab:'li[data-track-kind="descriptions"]',trackChaptersTab:'li[data-track-kind="chapters"]',trackMetadataTab:'li[data-track-kind="metadata"]',trackSubtitlesPane:'.tab-pane[data-track-kind="subtitles"]',trackCaptionsPane:'.tab-pane[data-track-kind="captions"]',trackDescriptionsPane:'.tab-pane[data-track-kind="descriptions"]',trackChaptersPane:'.tab-pane[data-track-kind="chapters"]',trackMetadataPane:'.tab-pane[data-track-kind="metadata"]'},mediaTypes:{link:"LINK",video:"VIDEO",audio:"AUDIO"},trackKinds:{subtitles:"SUBTITLES",captions:"CAPTIONS",descriptions:"DESCRIPTIONS",chapters:"CHAPTERS",metadata:"METADATA"}}},_exports.default}));
|
||||
define("tiny_media/selectors",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;return _exports.default={IMAGE:{actions:{submit:".tiny_image_urlentrysubmit",imageBrowser:".openimagebrowser",addUrl:".tiny_image_addurl",deleteImage:".tiny_image_deleteicon"},elements:{form:"form.tiny_image_form",alignSettings:".tiny_image_button",alt:".tiny_image_altentry",altWarning:".tiny_image_altwarning",height:".tiny_image_heightentry",width:".tiny_image_widthentry",url:".tiny_image_urlentry",urlWarning:".tiny_image_urlwarning",size:".tiny_image_size",presentation:".tiny_image_presentation",constrain:".tiny_image_constrain",customStyle:".tiny_image_customstyle",preview:".tiny_image_preview",previewBox:".tiny_image_preview_box",loaderIcon:".tiny_image_loader",loaderIconContainer:".tiny_image_loader_container",insertImage:".tiny_image_insert_image",modalFooter:".modal-footer",dropzoneContainer:".tiny_image_dropzone_container",fileInput:"#tiny_image_fileinput",fileNameLabel:".tiny_image_filename",sizeOriginal:".tiny_image_sizeoriginal",sizeCustom:".tiny_image_sizecustom",properties:".tiny_image_properties"},styles:{responsive:"img-fluid"}},EMBED:{actions:{mediaBrowser:".openmediabrowser"},elements:{source:".tiny_media_source",track:".tiny_media_track",posterSource:".tiny_media_poster_source",title:".tiny_media_title_entry",url:".tiny_media_url_entry",width:".tiny_media_width_entry",height:".tiny_media_height_entry",trackSource:".tiny_media_track_source",trackLabel:".tiny_media_track_label_entry",trackLang:".tiny_media_track_lang_entry",trackDefault:".tiny_media_track_default",mediaControl:".tiny_media_controls",mediaAutoplay:".tiny_media_autoplay",mediaMute:".tiny_media_mute",mediaLoop:".tiny_media_loop"}}},_exports.default}));
|
||||
|
||||
//# sourceMappingURL=selectors.min.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -21,17 +21,9 @@
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
import Templates from 'core/templates';
|
||||
import {
|
||||
getString,
|
||||
getStrings,
|
||||
} from 'core/str';
|
||||
import {getString} from 'core/str';
|
||||
import * as ModalEvents from 'core/modal_events';
|
||||
import {displayFilepicker} from 'editor_tiny/utils';
|
||||
import {getCurrentLanguage, getMoodleLang} from 'editor_tiny/options';
|
||||
import {component} from "./common";
|
||||
import EmbedModal from './embedmodal';
|
||||
import Selectors from './selectors';
|
||||
import {getEmbedPermissions} from './options';
|
||||
import {getFilePicker} from 'editor_tiny/options';
|
||||
|
||||
@@ -41,21 +33,6 @@ export default class MediaEmbed {
|
||||
canShowFilePickerPoster = false;
|
||||
canShowFilePickerTrack = false;
|
||||
|
||||
/**
|
||||
* @property {Object} The names of the alignment options.
|
||||
*/
|
||||
helpStrings = null;
|
||||
|
||||
/**
|
||||
* @property {boolean} Indicate that the user is updating the media or not.
|
||||
*/
|
||||
isUpdating = false;
|
||||
|
||||
/**
|
||||
* @property {Object} The currently selected media.
|
||||
*/
|
||||
selectedMedia = null;
|
||||
|
||||
constructor(editor) {
|
||||
const permissions = getEmbedPermissions(editor);
|
||||
|
||||
@@ -67,401 +44,30 @@ export default class MediaEmbed {
|
||||
this.editor = editor;
|
||||
}
|
||||
|
||||
async getHelpStrings() {
|
||||
if (!this.helpStrings) {
|
||||
const [addSource, tracks, subtitles, captions, descriptions, chapters, metadata] = await getStrings([
|
||||
'addsource_help',
|
||||
'tracks_help',
|
||||
'subtitles_help',
|
||||
'captions_help',
|
||||
'descriptions_help',
|
||||
'chapters_help',
|
||||
'metadata_help',
|
||||
].map((key) => ({
|
||||
key,
|
||||
component,
|
||||
})));
|
||||
|
||||
this.helpStrings = {addSource, tracks, subtitles, captions, descriptions, chapters, metadata};
|
||||
}
|
||||
|
||||
return this.helpStrings;
|
||||
}
|
||||
|
||||
async getTemplateContext(data) {
|
||||
const languages = this.prepareMoodleLang();
|
||||
|
||||
const helpIcons = Array.from(Object.entries(await this.getHelpStrings())).forEach(([key, text]) => {
|
||||
data[`${key.toLowerCase()}helpicon`] = {text};
|
||||
});
|
||||
|
||||
return Object.assign({}, {
|
||||
async getTemplateContext() {
|
||||
return {
|
||||
elementid: this.editor.getElement().id,
|
||||
showfilepicker: this.canShowFilePicker,
|
||||
showfilepickerposter: this.canShowFilePickerPoster,
|
||||
showfilepickertrack: this.canShowFilePickerTrack,
|
||||
langsinstalled: languages.installed,
|
||||
langsavailable: languages.available,
|
||||
link: true,
|
||||
video: false,
|
||||
audio: false,
|
||||
isupdating: this.isUpdating,
|
||||
}, data, helpIcons);
|
||||
};
|
||||
}
|
||||
|
||||
async displayDialogue() {
|
||||
this.selectedMedia = this.getSelectedMedia();
|
||||
const data = Object.assign({}, this.getCurrentEmbedData());
|
||||
this.isUpdating = Object.keys(data).length !== 0;
|
||||
|
||||
this.currentModal = await EmbedModal.create({
|
||||
title: getString('createmedia', 'tiny_media'),
|
||||
templateContext: await this.getTemplateContext(data),
|
||||
templateContext: await this.getTemplateContext(),
|
||||
});
|
||||
|
||||
await this.registerEventListeners(this.currentModal);
|
||||
}
|
||||
|
||||
getCurrentEmbedData() {
|
||||
const properties = this.getMediumProperties();
|
||||
if (!properties) {
|
||||
return {};
|
||||
}
|
||||
|
||||
const processedProperties = {};
|
||||
processedProperties[properties.type.toLowerCase()] = properties;
|
||||
processedProperties.link = false;
|
||||
|
||||
return processedProperties;
|
||||
}
|
||||
|
||||
getSelectedMedia() {
|
||||
const mediaElm = this.editor.selection.getNode();
|
||||
|
||||
if (!mediaElm) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mediaElm.nodeName.toLowerCase() === 'video' || mediaElm.nodeName.toLowerCase() === 'audio') {
|
||||
return mediaElm;
|
||||
}
|
||||
|
||||
if (mediaElm.querySelector('video')) {
|
||||
return mediaElm.querySelector('video');
|
||||
}
|
||||
|
||||
if (mediaElm.querySelector('audio')) {
|
||||
return mediaElm.querySelector('audio');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
getMediumProperties() {
|
||||
const boolAttr = (elem, attr) => {
|
||||
// As explained in MDL-64175, some OS (like Ubuntu), are removing the value for these attributes.
|
||||
// So in order to check if attr="true", we need to check if the attribute exists and if the value is empty or true.
|
||||
return (elem.hasAttribute(attr) && (elem.getAttribute(attr) || elem.getAttribute(attr) === ''));
|
||||
};
|
||||
|
||||
const tracks = {
|
||||
subtitles: [],
|
||||
captions: [],
|
||||
descriptions: [],
|
||||
chapters: [],
|
||||
metadata: []
|
||||
};
|
||||
const sources = [];
|
||||
|
||||
const medium = this.selectedMedia;
|
||||
if (!medium) {
|
||||
return null;
|
||||
}
|
||||
medium.querySelectorAll('track').forEach((track) => {
|
||||
tracks[track.getAttribute('kind')].push({
|
||||
src: track.getAttribute('src'),
|
||||
srclang: track.getAttribute('srclang'),
|
||||
label: track.getAttribute('label'),
|
||||
defaultTrack: boolAttr(track, 'default')
|
||||
});
|
||||
});
|
||||
|
||||
medium.querySelectorAll('source').forEach((source) => {
|
||||
sources.push(source.src);
|
||||
});
|
||||
|
||||
return {
|
||||
type: medium.nodeName.toLowerCase() === 'video' ? Selectors.EMBED.mediaTypes.video : Selectors.EMBED.mediaTypes.audio,
|
||||
sources,
|
||||
poster: medium.getAttribute('poster'),
|
||||
title: medium.getAttribute('title'),
|
||||
width: medium.getAttribute('width'),
|
||||
height: medium.getAttribute('height'),
|
||||
autoplay: boolAttr(medium, 'autoplay'),
|
||||
loop: boolAttr(medium, 'loop'),
|
||||
muted: boolAttr(medium, 'muted'),
|
||||
controls: boolAttr(medium, 'controls'),
|
||||
tracks,
|
||||
};
|
||||
}
|
||||
|
||||
prepareMoodleLang() {
|
||||
const moodleLangs = getMoodleLang(this.editor);
|
||||
const currentLanguage = getCurrentLanguage(this.editor);
|
||||
|
||||
const installed = Object.entries(moodleLangs.installed).map(([lang, code]) => ({
|
||||
lang,
|
||||
code,
|
||||
"default": lang === currentLanguage,
|
||||
}));
|
||||
|
||||
const available = Object.entries(moodleLangs.available).map(([lang, code]) => ({
|
||||
lang,
|
||||
code,
|
||||
"default": lang === currentLanguage,
|
||||
}));
|
||||
|
||||
return {
|
||||
installed,
|
||||
available,
|
||||
};
|
||||
}
|
||||
|
||||
getMoodleLangObj(subtitleLang) {
|
||||
const {available} = getMoodleLang(this.editor);
|
||||
|
||||
if (available[subtitleLang]) {
|
||||
return {
|
||||
lang: subtitleLang,
|
||||
code: available[subtitleLang],
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
filePickerCallback(params, element, fpType) {
|
||||
if (params.url !== '') {
|
||||
const tabPane = element.closest('.tab-pane');
|
||||
element.closest(Selectors.EMBED.elements.source).querySelector(Selectors.EMBED.elements.url).value = params.url;
|
||||
|
||||
if (tabPane.id === this.editor.getElement().id + '_' + Selectors.EMBED.mediaTypes.link.toLowerCase()) {
|
||||
tabPane.querySelector(Selectors.EMBED.elements.name).value = params.file;
|
||||
}
|
||||
|
||||
if (fpType === 'subtitle') {
|
||||
// If the file is subtitle file. We need to match the language and label for that file.
|
||||
const subtitleLang = params.file.split('.vtt')[0].split('-').slice(-1)[0];
|
||||
const langObj = this.getMoodleLangObj(subtitleLang);
|
||||
if (langObj) {
|
||||
const track = element.closest(Selectors.EMBED.elements.track);
|
||||
track.querySelector(Selectors.EMBED.elements.trackLabel).value = langObj.lang.trim();
|
||||
track.querySelector(Selectors.EMBED.elements.trackLang).value = langObj.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addMediaSourceComponent(element, callback) {
|
||||
const sourceElement = element.closest(Selectors.EMBED.elements.source + Selectors.EMBED.elements.mediaSource);
|
||||
const clone = sourceElement.cloneNode(true);
|
||||
|
||||
sourceElement.querySelector('.removecomponent-wrapper').classList.remove('hidden');
|
||||
sourceElement.querySelector('.addcomponent-wrapper').classList.add('hidden');
|
||||
|
||||
sourceElement.parentNode.insertBefore(clone, sourceElement.nextSibling);
|
||||
|
||||
if (callback) {
|
||||
callback(clone);
|
||||
}
|
||||
}
|
||||
|
||||
removeMediaSourceComponent(element) {
|
||||
const sourceElement = element.closest(Selectors.EMBED.elements.source + Selectors.EMBED.elements.mediaSource);
|
||||
sourceElement.remove();
|
||||
}
|
||||
|
||||
addTrackComponent(element, callback) {
|
||||
const trackElement = element.closest(Selectors.EMBED.elements.track);
|
||||
const clone = trackElement.cloneNode(true);
|
||||
|
||||
trackElement.querySelector('.removecomponent-wrapper').classList.remove('hidden');
|
||||
trackElement.querySelector('.addcomponent-wrapper').classList.add('hidden');
|
||||
|
||||
trackElement.parentNode.insertBefore(clone, trackElement.nextSibling);
|
||||
|
||||
if (callback) {
|
||||
callback(clone);
|
||||
}
|
||||
}
|
||||
|
||||
removeTrackComponent(element) {
|
||||
const sourceElement = element.closest(Selectors.EMBED.elements.track);
|
||||
sourceElement.remove();
|
||||
}
|
||||
|
||||
getMediumTypeFromTabPane(tabPane) {
|
||||
return tabPane.getAttribute('data-medium-type');
|
||||
}
|
||||
|
||||
getTrackTypeFromTabPane(tabPane) {
|
||||
return tabPane.getAttribute('data-track-kind');
|
||||
}
|
||||
|
||||
getMediaHTML(form) {
|
||||
const mediumType = this.getMediumTypeFromTabPane(form.querySelector('.root.tab-content > .tab-pane.active'));
|
||||
const tabContent = form.querySelector(Selectors.EMBED.elements[mediumType.toLowerCase() + 'Pane']);
|
||||
|
||||
return this['getMediaHTML' + mediumType[0].toUpperCase() + mediumType.substr(1)](tabContent);
|
||||
}
|
||||
|
||||
getMediaHTMLLink(tab) {
|
||||
const context = {
|
||||
url: tab.querySelector(Selectors.EMBED.elements.url).value,
|
||||
name: tab.querySelector(Selectors.EMBED.elements.name).value || false
|
||||
};
|
||||
|
||||
return context.url ? Templates.renderForPromise('tiny_media/embed_media_link', context) : '';
|
||||
}
|
||||
|
||||
getMediaHTMLVideo(tab) {
|
||||
const context = this.getContextForMediaHTML(tab);
|
||||
context.width = tab.querySelector(Selectors.EMBED.elements.width).value || false;
|
||||
context.height = tab.querySelector(Selectors.EMBED.elements.height).value || false;
|
||||
context.poster = tab.querySelector(
|
||||
`${Selectors.EMBED.elements.posterSource} ${Selectors.EMBED.elements.url}`
|
||||
).value || false;
|
||||
|
||||
return context.sources.length ? Templates.renderForPromise('tiny_media/embed_media_video', context) : '';
|
||||
}
|
||||
|
||||
getMediaHTMLAudio(tab) {
|
||||
const context = this.getContextForMediaHTML(tab);
|
||||
|
||||
return context.sources.length ? Templates.renderForPromise('tiny_media/embed_media_audio', context) : '';
|
||||
}
|
||||
|
||||
getContextForMediaHTML(tab) {
|
||||
const tracks = Array.from(tab.querySelectorAll(Selectors.EMBED.elements.track)).map(track => ({
|
||||
track: track.querySelector(Selectors.EMBED.elements.trackSource + ' ' + Selectors.EMBED.elements.url).value,
|
||||
kind: this.getTrackTypeFromTabPane(track.closest('.tab-pane')),
|
||||
label: track.querySelector(Selectors.EMBED.elements.trackLabel).value ||
|
||||
track.querySelector(Selectors.EMBED.elements.trackLang).value,
|
||||
srclang: track.querySelector(Selectors.EMBED.elements.trackLang).value,
|
||||
defaultTrack: track.querySelector(Selectors.EMBED.elements.trackDefault).checked ? "true" : null
|
||||
})).filter((track) => !!track.track);
|
||||
|
||||
const sources = Array.from(tab.querySelectorAll(Selectors.EMBED.elements.mediaSource + ' '
|
||||
+ Selectors.EMBED.elements.url))
|
||||
.filter((source) => !!source.value)
|
||||
.map((source) => source.value);
|
||||
|
||||
return {
|
||||
sources,
|
||||
description: tab.querySelector(Selectors.EMBED.elements.mediaSource + ' '
|
||||
+ Selectors.EMBED.elements.url).value || false,
|
||||
tracks,
|
||||
showControls: tab.querySelector(Selectors.EMBED.elements.mediaControl).checked,
|
||||
autoplay: tab.querySelector(Selectors.EMBED.elements.mediaAutoplay).checked,
|
||||
muted: tab.querySelector(Selectors.EMBED.elements.mediaMute).checked,
|
||||
loop: tab.querySelector(Selectors.EMBED.elements.mediaLoop).checked,
|
||||
title: tab.querySelector(Selectors.EMBED.elements.title).value || false
|
||||
};
|
||||
}
|
||||
|
||||
getFilepickerTypeFromElement(element) {
|
||||
if (element.closest(Selectors.EMBED.elements.posterSource)) {
|
||||
return 'image';
|
||||
}
|
||||
if (element.closest(Selectors.EMBED.elements.trackSource)) {
|
||||
return 'subtitle';
|
||||
}
|
||||
|
||||
return 'media';
|
||||
}
|
||||
|
||||
async clickHandler(e) {
|
||||
const element = e.target;
|
||||
|
||||
const mediaBrowser = element.closest(Selectors.EMBED.actions.mediaBrowser);
|
||||
if (mediaBrowser) {
|
||||
e.preventDefault();
|
||||
const fpType = this.getFilepickerTypeFromElement(element);
|
||||
const params = await displayFilepicker(this.editor, fpType);
|
||||
this.filePickerCallback(params, element, fpType);
|
||||
}
|
||||
|
||||
const addComponentSourceAction = element.closest(Selectors.EMBED.elements.mediaSource + ' .addcomponent');
|
||||
if (addComponentSourceAction) {
|
||||
e.preventDefault();
|
||||
this.addMediaSourceComponent(element);
|
||||
}
|
||||
|
||||
const removeComponentSourceAction = element.closest(Selectors.EMBED.elements.mediaSource + ' .removecomponent');
|
||||
if (removeComponentSourceAction) {
|
||||
e.preventDefault();
|
||||
this.removeMediaSourceComponent(element);
|
||||
}
|
||||
|
||||
const addComponentTrackAction = element.closest(Selectors.EMBED.elements.track + ' .addcomponent');
|
||||
if (addComponentTrackAction) {
|
||||
e.preventDefault();
|
||||
this.addTrackComponent(element);
|
||||
}
|
||||
|
||||
const removeComponentTrackAction = element.closest(Selectors.EMBED.elements.track + ' .removecomponent');
|
||||
if (removeComponentTrackAction) {
|
||||
e.preventDefault();
|
||||
this.removeTrackComponent(element);
|
||||
}
|
||||
|
||||
// Only allow one track per tab to be selected as "default".
|
||||
const trackDefaultAction = element.closest(Selectors.EMBED.elements.trackDefault);
|
||||
if (trackDefaultAction && trackDefaultAction.checked) {
|
||||
const getKind = (el) => this.getTrackTypeFromTabPane(el.parentElement.closest('.tab-pane'));
|
||||
|
||||
element.parentElement
|
||||
.closest('.root.tab-content')
|
||||
.querySelectorAll(Selectors.EMBED.elements.trackDefault)
|
||||
.forEach((select) => {
|
||||
if (select !== element && getKind(element) === getKind(select)) {
|
||||
select.checked = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
async handleDialogueSubmission(event, modal) {
|
||||
const {html} = await this.getMediaHTML(modal.getRoot()[0]);
|
||||
if (html) {
|
||||
if (this.isUpdating) {
|
||||
this.selectedMedia.outerHTML = html;
|
||||
this.isUpdating = false;
|
||||
} else {
|
||||
this.editor.insertContent(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async registerEventListeners(modal) {
|
||||
await modal.getBody();
|
||||
const $root = modal.getRoot();
|
||||
const root = $root[0];
|
||||
if (this.canShowFilePicker || this.canShowFilePickerPoster || this.canShowFilePickerTrack) {
|
||||
root.addEventListener('click', this.clickHandler.bind(this));
|
||||
}
|
||||
|
||||
$root.on(ModalEvents.save, this.handleDialogueSubmission.bind(this));
|
||||
$root.on(ModalEvents.hidden, () => {
|
||||
this.currentModal.destroy();
|
||||
});
|
||||
$root.on(ModalEvents.shown, () => {
|
||||
root.querySelectorAll(Selectors.EMBED.elements.trackLang).forEach((dropdown) => {
|
||||
const defaultVal = dropdown.getAttribute('data-value');
|
||||
if (defaultVal) {
|
||||
dropdown.value = defaultVal;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,26 +61,17 @@ export default {
|
||||
},
|
||||
EMBED: {
|
||||
actions: {
|
||||
submit: '.tiny_media_submit',
|
||||
mediaBrowser: '.openmediabrowser',
|
||||
},
|
||||
elements: {
|
||||
form: 'form.tiny_media_form',
|
||||
source: '.tiny_media_source',
|
||||
track: '.tiny_media_track',
|
||||
mediaSource: '.tiny_media_media_source',
|
||||
linkSource: '.tiny_media_link_source',
|
||||
linkSize: '.tiny_media_link_size',
|
||||
posterSource: '.tiny_media_poster_source',
|
||||
posterSize: '.tiny_media_poster_size',
|
||||
displayOptions: '.tiny_media_display_options',
|
||||
name: '.tiny_media_name_entry',
|
||||
title: '.tiny_media_title_entry',
|
||||
url: '.tiny_media_url_entry',
|
||||
width: '.tiny_media_width_entry',
|
||||
height: '.tiny_media_height_entry',
|
||||
trackSource: '.tiny_media_track_source',
|
||||
trackKind: '.tiny_media_track_kind_entry',
|
||||
trackLabel: '.tiny_media_track_label_entry',
|
||||
trackLang: '.tiny_media_track_lang_entry',
|
||||
trackDefault: '.tiny_media_track_default',
|
||||
@@ -88,35 +79,6 @@ export default {
|
||||
mediaAutoplay: '.tiny_media_autoplay',
|
||||
mediaMute: '.tiny_media_mute',
|
||||
mediaLoop: '.tiny_media_loop',
|
||||
advancedSettings: '.tiny_media_advancedsettings',
|
||||
linkTab: 'li[data-medium-type="link"]',
|
||||
videoTab: 'li[data-medium-type="video"]',
|
||||
audioTab: 'li[data-medium-type="audio"]',
|
||||
linkPane: '.tab-pane[data-medium-type="link"]',
|
||||
videoPane: '.tab-pane[data-medium-type="video"]',
|
||||
audioPane: '.tab-pane[data-medium-type="audio"]',
|
||||
trackSubtitlesTab: 'li[data-track-kind="subtitles"]',
|
||||
trackCaptionsTab: 'li[data-track-kind="captions"]',
|
||||
trackDescriptionsTab: 'li[data-track-kind="descriptions"]',
|
||||
trackChaptersTab: 'li[data-track-kind="chapters"]',
|
||||
trackMetadataTab: 'li[data-track-kind="metadata"]',
|
||||
trackSubtitlesPane: '.tab-pane[data-track-kind="subtitles"]',
|
||||
trackCaptionsPane: '.tab-pane[data-track-kind="captions"]',
|
||||
trackDescriptionsPane: '.tab-pane[data-track-kind="descriptions"]',
|
||||
trackChaptersPane: '.tab-pane[data-track-kind="chapters"]',
|
||||
trackMetadataPane: '.tab-pane[data-track-kind="metadata"]',
|
||||
},
|
||||
mediaTypes: {
|
||||
link: 'LINK',
|
||||
video: 'VIDEO',
|
||||
audio: 'AUDIO',
|
||||
},
|
||||
trackKinds: {
|
||||
subtitles: 'SUBTITLES',
|
||||
captions: 'CAPTIONS',
|
||||
descriptions: 'DESCRIPTIONS',
|
||||
chapters: 'CHAPTERS',
|
||||
metadata: 'METADATA',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -5,3 +5,18 @@ alignment_middle,tiny_media
|
||||
alignment_right,tiny_media
|
||||
alignment_top,tiny_media
|
||||
helplinktext,tiny_media
|
||||
addsource,tiny_media
|
||||
addsource_help,tiny_media
|
||||
advancedsettings,tiny_media
|
||||
audio,tiny_media
|
||||
audiosourcelabel,tiny_media
|
||||
createmedia,tiny_media
|
||||
displayoptions,tiny_media
|
||||
entername,tiny_media
|
||||
entersource,tiny_media
|
||||
link,tiny_media
|
||||
updatemedia,tiny_media
|
||||
video,tiny_media
|
||||
videoheight,tiny_media
|
||||
videosourcelabel,tiny_media
|
||||
videowidth,tiny_media
|
||||
|
||||
@@ -27,13 +27,8 @@ $string['addchapterstrack'] = 'Add chapter track';
|
||||
$string['adddescriptionstrack'] = 'Add description track';
|
||||
$string['addfilesdrop'] = 'Drag and drop an image to upload, or click to select';
|
||||
$string['addmetadatatrack'] = 'Add metadata track';
|
||||
$string['addsource_help'] = 'You are recommended to provide an alternative media source, as desktop and mobile browsers support different file formats.';
|
||||
$string['addsource'] = 'Add alternative source';
|
||||
$string['addsubtitlestrack'] = 'Add subtitle track';
|
||||
$string['addurl'] = 'Add';
|
||||
$string['advancedsettings'] = 'Advanced settings';
|
||||
$string['audio'] = 'Audio';
|
||||
$string['audiosourcelabel'] = 'Audio source URL';
|
||||
$string['autoplay'] = 'Play automatically';
|
||||
$string['browserepositories'] = 'Browse repositories...';
|
||||
$string['browserepositoriesimage'] = 'Browse repositories';
|
||||
@@ -45,7 +40,6 @@ $string['chapters'] = 'Chapters';
|
||||
$string['chapterssourcelabel'] = 'Chapter track URL';
|
||||
$string['constrain'] = 'Keep proportion';
|
||||
$string['controls'] = 'Show controls';
|
||||
$string['createmedia'] = 'Insert media';
|
||||
$string['default'] = 'Default';
|
||||
$string['deleteimage'] = 'Delete image';
|
||||
$string['deleteimagewarning'] = 'Are you sure you want to remove the image?';
|
||||
@@ -53,10 +47,7 @@ $string['deleteselected'] = 'Delete selected files';
|
||||
$string['descriptions_help'] = 'Audio descriptions may be used to provide a narration which explains visual details not apparent from the audio alone.';
|
||||
$string['descriptions'] = 'Descriptions';
|
||||
$string['descriptionssourcelabel'] = 'Description track URL';
|
||||
$string['displayoptions'] = 'Display options';
|
||||
$string['enteralt'] = 'How would you describe this image to someone who can\'t see it?';
|
||||
$string['entername'] = 'Name';
|
||||
$string['entersource'] = 'Source URL';
|
||||
$string['enteralt'] = 'How would you describe this image to someone who can\'t see it:';
|
||||
$string['entertitle'] = 'Title';
|
||||
$string['enterurl'] = 'Add via URL';
|
||||
$string['enterurlor'] = 'Or add via URL';
|
||||
@@ -71,7 +62,6 @@ $string['insertimage'] = 'Insert image';
|
||||
$string['label'] = 'Label';
|
||||
$string['languagesavailable'] = 'Languages available';
|
||||
$string['languagesinstalled'] = 'Languages installed';
|
||||
$string['link'] = 'Link';
|
||||
$string['loading'] = 'Preparing the image';
|
||||
$string['loop'] = 'Loop';
|
||||
$string['managefiles'] = 'Manage files';
|
||||
@@ -105,12 +95,7 @@ $string['tracks'] = 'Subtitles and captions';
|
||||
$string['unusedfilesdesc'] = 'The following embedded files are not used in the text area:';
|
||||
$string['unusedfilesheader'] = 'Unused files';
|
||||
$string['unusedfilesremovalnotice'] = 'Any unused files will be automatically deleted when saving changes.';
|
||||
$string['updatemedia'] = 'Update media';
|
||||
$string['uploading'] = 'Uploading';
|
||||
$string['video'] = 'Video';
|
||||
$string['videoheight'] = 'Video height';
|
||||
$string['videosourcelabel'] = 'Video source URL';
|
||||
$string['videowidth'] = 'Video width';
|
||||
$string['width'] = 'Width';
|
||||
|
||||
// Deprecated since Moodle 4.4.
|
||||
@@ -122,4 +107,19 @@ $string['alignment_right'] = 'Right';
|
||||
$string['alignment_top'] = 'Top';
|
||||
|
||||
// Deprecated since Moodle 4.5.
|
||||
$string['addsource'] = 'Add alternative source';
|
||||
$string['addsource_help'] = 'You are recommended to provide an alternative media source, as desktop and mobile browsers support different file formats.';
|
||||
$string['advancedsettings'] = 'Advanced settings';
|
||||
$string['audio'] = 'Audio';
|
||||
$string['audiosourcelabel'] = 'Audio source URL';
|
||||
$string['createmedia'] = 'Insert media';
|
||||
$string['displayoptions'] = 'Display options';
|
||||
$string['entername'] = 'Name';
|
||||
$string['entersource'] = 'Source URL';
|
||||
$string['helplinktext'] = 'Media helper';
|
||||
$string['link'] = 'Link';
|
||||
$string['updatemedia'] = 'Update media';
|
||||
$string['video'] = 'Video';
|
||||
$string['videoheight'] = 'Video height';
|
||||
$string['videosourcelabel'] = 'Video source URL';
|
||||
$string['videowidth'] = 'Video width';
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/body/insert_media_body
|
||||
|
||||
Insert media body template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"showDropzone": true,
|
||||
"showFilePicker": true
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="tiny_media_insert_media" id="tiny-insert-media">
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
{{#showDropzone}}
|
||||
<div class="tiny_media_dropzone_container"></div>
|
||||
{{/showDropzone}}
|
||||
{{^showDropzone}}
|
||||
<div class="text-center">
|
||||
<i class="fa-6x pb-2 text-secondary fa fa-cloud"></i>
|
||||
<div class="lead text-center">
|
||||
<p class="mb-0">
|
||||
{{#showFilePicker}}
|
||||
{{#str}} nofilepicker, tiny_media {{/str}}
|
||||
{{/showFilePicker}}
|
||||
{{^showFilePicker}}
|
||||
{{#str}} nofilepickerrepository, tiny_media, {{fileType}} {{/str}}
|
||||
{{/showFilePicker}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{/showDropzone}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,232 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/body/media_details_body
|
||||
|
||||
Media preview body template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"isVideo": true,
|
||||
"isAudio": true,
|
||||
"isLink": true,
|
||||
"canHaveThumbnail": true,
|
||||
"isAudioTag": true,
|
||||
"isVideoTag": true,
|
||||
"elementid": "id",
|
||||
"media" : {
|
||||
"poster": "link/to/poster",
|
||||
"title": "media name/title",
|
||||
"isUpdating": true,
|
||||
"controls": true,
|
||||
"autoplay": false,
|
||||
"muted": false,
|
||||
"loop": false,
|
||||
"width": "1200",
|
||||
"height": "800"
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
<div id="tiny-media-details-body" class="d-none">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-7 p-0">
|
||||
<div class="tiny_media_preview_box border rounded">
|
||||
<button class="btn rounded-circle tiny_media_delete_icon" tabindex="0" title="{{#str}} deletemedia, tiny_media {{/str}}">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</button>
|
||||
{{#isVideo}}
|
||||
<video controls
|
||||
id="video-tag"
|
||||
class="tiny_media_preview_tag"
|
||||
{{#media.poster}}poster="{{media.poster}}"{{/media.poster}}
|
||||
{{#media.autoplay}}autoplay="autoplay"{{/media.autoplay}}
|
||||
{{#media.muted}}muted="{{media.muted}}"{{/media.muted}}
|
||||
{{#media.loop}}loop="{{media.loop}}"{{/media.loop}}
|
||||
>
|
||||
<source class="tiny_media_preview" src="data:,">
|
||||
Your browser does not support HTML5 video.
|
||||
</video>
|
||||
{{/isVideo}}
|
||||
{{#isAudio}}
|
||||
<audio controls
|
||||
id="audio-tag"
|
||||
class="tiny_media_preview_tag"
|
||||
{{#media.autoplay}}autoplay="autoplay"{{/media.autoplay}}
|
||||
{{#media.muted}}muted="{{media.muted}}"{{/media.muted}}
|
||||
{{#media.loop}}loop="{{media.loop}}"{{/media.loop}}
|
||||
>
|
||||
<source class="tiny_media_preview" src="data:,">
|
||||
Your browser does not support HTML5 audio.
|
||||
</audio>
|
||||
{{/isAudio}}
|
||||
{{#isLink}}
|
||||
<iframe class="tiny_media_preview tiny_media_preview_tag"></iframe>
|
||||
{{/isLink}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tiny_media_properties_col col-lg-5 tiny_media_source tiny_media_poster_source">
|
||||
<div class="mb-2">
|
||||
<div>
|
||||
<label for="{{elementid}}_tiny_media_title_entry">{{#str}} entertitle, tiny_media {{/str}}</label>
|
||||
<div class="input-group-append">
|
||||
<input
|
||||
class="tiny_media_title_entry form-control"
|
||||
type="text"
|
||||
id="{{elementid}}_tiny_media_title_entry"
|
||||
size="32"
|
||||
{{#media.title}}value="{{media.title}}"{{/media.title}}
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
{{#isLink}}
|
||||
<input type="hidden" class="media-link-embed-type" value="{{mediaTagType}}">
|
||||
{{/isLink}}
|
||||
{{#canHaveThumbnail}}
|
||||
<div class="video-thumbnail">
|
||||
<div class="input-group-append mt-2">
|
||||
<button class="btn btn-primary upload-custom-thumbnail" type="button">
|
||||
{{#media.poster}}
|
||||
{{#str}} changethumbnail, tiny_media {{/str}}
|
||||
{{/media.poster}}
|
||||
{{^media.poster}}
|
||||
{{#str}} uploadthumbnail, tiny_media {{/str}}
|
||||
{{/media.poster}}
|
||||
</button>
|
||||
</div>
|
||||
{{#media.poster}}
|
||||
<div class="input-group-append mt-2">
|
||||
<button class="btn btn-secondary delete-custom-thumbnail" type="button">{{#str}} deleteembeddedthumbnail, tiny_media {{/str}}</button>
|
||||
</div>
|
||||
{{/media.poster}}
|
||||
</div>
|
||||
{{/canHaveThumbnail}}
|
||||
</div>
|
||||
<div class="ml-4 mt-4">
|
||||
<div class="input-group-append">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input tiny_media_controls"
|
||||
id="vadvancedsettings_media-controls-toggle"
|
||||
{{#isNewFileOrLinkUpload}}checked{{/isNewFileOrLinkUpload}}
|
||||
{{#media.controls}}checked{{/media.controls}}
|
||||
>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-controls-toggle">
|
||||
{{#str}} controls, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input tiny_media_autoplay"
|
||||
id="vadvancedsettings_media-autoplay-toggle"
|
||||
{{#media.autoplay}}checked{{/media.autoplay}}
|
||||
>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-autoplay-toggle">
|
||||
{{#str}} autoplay, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input tiny_media_mute"
|
||||
id="vadvancedsettings_media-mute-toggle"
|
||||
{{#media.muted}}checked{{/media.muted}}
|
||||
>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-mute-toggle">
|
||||
{{#str}} mute, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input tiny_media_loop"
|
||||
id="vadvancedsettings_media-loop-toggle"
|
||||
{{#media.loop}}checked{{/media.loop}}
|
||||
>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-loop-toggle">
|
||||
{{#str}} loop, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{#canHaveThumbnail}}
|
||||
<div class="media-size-properties">
|
||||
<hr>
|
||||
<div class="size-container">
|
||||
<div>
|
||||
<input type="radio" class="tiny_media_sizeoriginal form-check-input" id="{{elementid}}_tiny_media_sizeoriginal" name="radioOptions">
|
||||
<label class="form-check-label" for="{{elementid}}_tiny_media_sizeoriginal">{{#str}} sizeoriginal, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div>
|
||||
<input type="radio" class="tiny_media_sizecustom form-check-input" id="{{elementid}}_tiny_media_sizecustom" name="radioOptions">
|
||||
<label class="form-check-label" for="{{elementid}}_tiny_media_sizecustom">{{#str}} sizecustom, tiny_media {{/str}}</label>
|
||||
{{#isLink}}
|
||||
{{#linkcustomsizehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/linkcustomsizehelpicon}}
|
||||
{{/isLink}}
|
||||
{{^isLink}}
|
||||
{{#customsizehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/customsizehelpicon}}
|
||||
{{/isLink}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check mt-2 ml-1 tiny_media_properties">
|
||||
<div class="d-flex justify-content-start">
|
||||
<div class="flex-item mr-2">
|
||||
<div class="form-group mb-0">
|
||||
<input
|
||||
type="number"
|
||||
min="0"
|
||||
class="tiny_media_width_entry form-control mr-1 input-mini"
|
||||
id="{{elementid}}_tiny_media_width_entry"
|
||||
value="{{media.width}}"
|
||||
placeholder="1200"
|
||||
>
|
||||
<label for="{{elementid}}_tiny_media_width_entry" class="ml-1">{{#str}} width, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-item mr-1 mt-2">X</div>
|
||||
<div class="flex-item mr-1">
|
||||
<div class="form-group mb-0">
|
||||
<input
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="800"
|
||||
class="tiny_media_height_entry form-control ml-1 input-mini"
|
||||
id="{{elementid}}_tiny_media_height_entry"
|
||||
value="{{media.height}}"
|
||||
>
|
||||
<label for="{{elementid}}_tiny_media_height_entry" class="ml-1">{{#str}} height, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/canHaveThumbnail}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tiny-media-subtitle-caption-body" class="d-none">
|
||||
<div class="container">
|
||||
{{> tiny_media/embed/insert_media_subtitle_caption }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,39 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/body/media_thumbnail_body
|
||||
|
||||
Insert thumbnail preview body template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="container tiny_media_insert_media d-none" id="tiny-media-thumbnail-preview">
|
||||
<div class="row">
|
||||
<div class="tiny_media_preview_col col-lg-12 p-0">
|
||||
<div class="tiny_media_preview_box border rounded">
|
||||
<button class="btn rounded-circle tiny_media_delete_icon delete_tiny_thumbnail" tabindex="0" title="{{#str}} deletemediathumbnail, tiny_media {{/str}}">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</button>
|
||||
<img class="tiny_media_thumbnail_preview img-fluid" alt="media thumbnail image" src="data:,">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
}
|
||||
}}
|
||||
<audio{{!
|
||||
<audio {{#isLinkMediaType}}class="media-link"{{/isLinkMediaType}}{{!
|
||||
}}{{#showControls}} controls="true" {{/showControls}}{{!
|
||||
}}{{#loop}} loop="true"{{/loop}}{{!
|
||||
}}{{#muted}} muted="true"{{/muted}}{{!
|
||||
@@ -0,0 +1,61 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed_media_modal
|
||||
|
||||
Embed media modal template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
||||
{{< core/modal }}
|
||||
|
||||
{{$body}}
|
||||
<form class="tiny_media_form" id="{{elementid}}_tiny_media_form">
|
||||
<div role="alert" class="d-none alert alert-warning mb-1 tiny_media_url_warning">
|
||||
<label>
|
||||
{{#str}} mediaurlrequired, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div role="progressbar" class="d-none tiny_media_loader lead border rounded text-center">
|
||||
<div class="tiny_media_loader_container d-flex flex-column justify-content-center">
|
||||
<span data-region="loading-icon-container">
|
||||
{{> core/loading }}
|
||||
</span>
|
||||
<div>{{#str}} loadingmedia, tiny_media {{/str}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tiny_media_body_template"></div>
|
||||
</form>
|
||||
{{/body}}
|
||||
|
||||
{{$footer}}
|
||||
<div class="tiny_media_footer_template container">
|
||||
<div class="row">
|
||||
<div class="col-md-6"></div>
|
||||
<div class="col-md-6 text-right p-0">
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">
|
||||
{{#str}} cancel, moodle {{/str}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/footer}}
|
||||
|
||||
{{/ core/modal }}
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
|
||||
}
|
||||
}}
|
||||
<video{{!
|
||||
<video {{#isLinkMediaType}}class="media-link"{{/isLinkMediaType}}{{!
|
||||
}}{{#width}} width="{{.}}"{{/width}}{{!
|
||||
}}{{#height}} height="{{.}}"{{/height}}{{!
|
||||
}}{{#poster}} poster="{{.}}"{{/poster}}{{!
|
||||
@@ -0,0 +1,55 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/footer/insert_media_footer
|
||||
|
||||
Insert media footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"elementid": "id",
|
||||
"isInsertThumbnail": false,
|
||||
"showDropzone": true,
|
||||
"showFilePicker": true
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="row">
|
||||
<div class="col-md-6 d-flex align-items-center p-0">
|
||||
{{#showDropzone}}
|
||||
<label for="{{elementid}}_tiny_media_from_url_entry" class="me-1">{{#str}} enterurlor, tiny_media {{/str}}</label>
|
||||
{{/showDropzone}}
|
||||
{{^showDropzone}}
|
||||
<label for="{{elementid}}_tiny_media_from_url_entry" class="me-1">{{#str}} enterurl, tiny_media {{/str}}</label>
|
||||
{{/showDropzone}}
|
||||
<input
|
||||
name="urlentry"
|
||||
class="tiny_media_from_url_entry form-control w-50 mr-1"
|
||||
type="url"
|
||||
id="{{elementid}}_tiny_media_from_url_entry"
|
||||
size="32"
|
||||
value="{{src}}"
|
||||
>
|
||||
<button disabled class="tiny_media_add_url btn btn-secondary mr-1" type="button">{{#str}} addurl, tiny_media {{/str}}</button>
|
||||
</div>
|
||||
<div class="col-md-6 text-right mt-2 md-0 p-0">
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
||||
{{#showFilePicker}}
|
||||
<button class="openmediabrowser btn btn-secondary" type="button">{{#str}} browseembedimagerepositories, tiny_media {{/str}}</button>
|
||||
{{/showFilePicker}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,40 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/footer/media_details_footer
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"isLink": true,
|
||||
"isUpdating": true,
|
||||
"canHaveThumbnail": true
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="row" id="media-details-footer">
|
||||
<div class="col-md-6 d-flex align-items-center p-0">
|
||||
<span class="tiny_media_filename text-truncate mr-1"></span>
|
||||
</div>
|
||||
<div class="col-md-6 text-right mt-2 md-0 p-0">
|
||||
<button type="button" class="btn btn-secondary d-none" data-action="back-to-media-details">{{#str}} back, tiny_media {{/str}}</button>
|
||||
<a class="subtitle-caption mr-2" data-action="show-subtitle-caption" href="#">{{#str}} subtitlesandcaptions, tiny_media {{/str}}</a>
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
||||
<button class="tiny_media_submit btn btn-primary" data-action="save">{{#str}} saveimage, tiny_media {{/str}}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,36 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/footer/media_thumbnail_footer
|
||||
|
||||
Media thumbnail preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="row" id="tiny-media-thumbnail-preview-footer">
|
||||
<div class="col-md-6 d-flex align-items-center p-0">
|
||||
<span class="tiny_media_filename text-truncate mr-1"></span>
|
||||
</div>
|
||||
<div class="col-md-6 text-right mt-2 md-0 p-0">
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
||||
<button class="btn btn-primary" data-action="set-poster">{{#str}} next, tiny_media {{/str}}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,107 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/insert_media_subtitle_caption
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"elementid": "id",
|
||||
"subtitleshelpicon": "subtitle help icon",
|
||||
"captionshelpicon": "caption help icon",
|
||||
"descriptionshelpicon": "description help icon",
|
||||
"chaptershelpicon": "chapter help icon",
|
||||
"metadatahelpicon": "metadata help icon",
|
||||
"helpStrings": {
|
||||
"metadata": "metadata"
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
<div id="vtracks" class="fcontainer px-1">
|
||||
<ul class="nav nav-tabs mb-3" role="tablist">
|
||||
<li data-track-kind="subtitles" class="nav-item">
|
||||
<a class="nav-link active" href="#{{elementid}}_vtracks_subtitles" role="tab" data-toggle="tab">
|
||||
{{#str}} subtitles, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="captions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_captions" role="tab" data-toggle="tab">
|
||||
{{#str}} captions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="descriptions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_descriptions" role="tab" data-toggle="tab">
|
||||
{{#str}} descriptions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="chapters" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_chapters" role="tab" data-toggle="tab">
|
||||
{{#str}} chapters, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="metadata" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_metadata" role="tab" data-toggle="tab">
|
||||
{{#str}} metadata, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div data-track-kind="subtitles" class="tab-pane active tab-pane-media-metadata" id="{{elementid}}_vtracks_subtitles">
|
||||
<div class="trackhelp">
|
||||
{{#subtitleshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/subtitleshelpicon}}
|
||||
</div>
|
||||
{{> tiny_media/embed/metadata/subtitles }}
|
||||
</div>
|
||||
<div data-track-kind="captions" class="tab-pane tab-pane-media-metadata" id="{{elementid}}_vtracks_captions">
|
||||
<div class="trackhelp">
|
||||
{{#captionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/captionshelpicon}}
|
||||
</div>
|
||||
{{> tiny_media/embed/metadata/captions }}
|
||||
</div>
|
||||
<div data-track-kind="descriptions" class="tab-pane tab-pane-media-metadata" id="{{elementid}}_vtracks_descriptions">
|
||||
<div class="trackhelp">
|
||||
{{#descriptionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/descriptionshelpicon}}
|
||||
</div>
|
||||
{{> tiny_media/embed/metadata/descriptions }}
|
||||
</div>
|
||||
<div data-track-kind="chapters" class="tab-pane tab-pane-media-metadata" id="{{elementid}}_vtracks_chapters">
|
||||
<div class="trackhelp">
|
||||
{{#chaptershelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/chaptershelpicon}}
|
||||
</div>
|
||||
{{> tiny_media/embed/metadata/chapters }}
|
||||
</div>
|
||||
<div data-track-kind="metadata" class="tab-pane tab-pane-media-metadata" id="{{elementid}}_vtracks_metadata">
|
||||
<div class="trackhelp">{{{helpStrings.metadata}}}</div>
|
||||
<div class="trackhelp">
|
||||
{{#metadatahelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/metadatahelpicon}}
|
||||
</div>
|
||||
{{> tiny_media/embed/metadata/metadata }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,37 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/link_media_type_selector
|
||||
|
||||
Show media type options.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
<button class="link_as_audio btn mr-4" title="{{#str}}audio, tiny_media{{/str}}">
|
||||
<i class="fa fa-file-audio"></i>
|
||||
<div>{{#str}}audio, tiny_media{{/str}}</div>
|
||||
</button>
|
||||
<button class="link_as_video btn ml-4" title="{{#str}}video, tiny_media{{/str}}">
|
||||
<i class="fa fa-file-video"></i>
|
||||
<div>{{#str}}video, tiny_media{{/str}}</div>
|
||||
</button>
|
||||
</div>
|
||||
@@ -0,0 +1,145 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/metadata/captions
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"media": {
|
||||
"tracks": {
|
||||
"captions": "captions"
|
||||
}
|
||||
},
|
||||
"showFilePickerTrack": true,
|
||||
"langsInstalled": "installed langs",
|
||||
"src": "http://moodle.com/link/to/source",
|
||||
"srclang": "selected lang",
|
||||
"default": true,
|
||||
"langsAvailable": "avalialbe langs",
|
||||
"defaultTrack": true,
|
||||
"label": "selected track",
|
||||
"code": "lang code",
|
||||
"lang": "lang name"
|
||||
}
|
||||
|
||||
}}
|
||||
{{#media.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-video-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-video-lang-input" class="custom-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{#defaultTrack }}checked{{/defaultTrack }}>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.captions}}
|
||||
{{^media.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-video-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-video-lang-input" class="custom-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default">
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.captions}}
|
||||
@@ -0,0 +1,145 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/metadata/chapters
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"media": {
|
||||
"tracks": {
|
||||
"chapters": "chapters"
|
||||
}
|
||||
},
|
||||
"showFilePickerTrack": true,
|
||||
"langsInstalled": "installed langs",
|
||||
"src": "http://moodle.com/link/to/source",
|
||||
"srclang": "selected lang",
|
||||
"default": true,
|
||||
"langsAvailable": "avalialbe langs",
|
||||
"defaultTrack": true,
|
||||
"label": "selected track",
|
||||
"code": "lang code",
|
||||
"lang": "lang name"
|
||||
}
|
||||
|
||||
}}
|
||||
{{#media.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-video-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-video-lang-input" class="custom-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.chapters}}
|
||||
{{^media.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-video-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-video-lang-input" class="custom-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default">
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.chapters}}
|
||||
@@ -0,0 +1,145 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/metadata/descriptions
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"media": {
|
||||
"tracks": {
|
||||
"descriptions": "descriptions"
|
||||
}
|
||||
},
|
||||
"showFilePickerTrack": true,
|
||||
"langsInstalled": "installed langs",
|
||||
"src": "http://moodle.com/link/to/source",
|
||||
"srclang": "selected lang",
|
||||
"default": true,
|
||||
"langsAvailable": "avalialbe langs",
|
||||
"defaultTrack": true,
|
||||
"label": "selected track",
|
||||
"code": "lang code",
|
||||
"lang": "lang name"
|
||||
}
|
||||
|
||||
}}
|
||||
{{#media.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-video-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-video-lang-input" class="custom-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.descriptions}}
|
||||
{{^media.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-video-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-video-lang-input" class="custom-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default">
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.descriptions}}
|
||||
@@ -0,0 +1,145 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/metadata/metadata
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"media": {
|
||||
"tracks": {
|
||||
"metadata": "metadata"
|
||||
}
|
||||
},
|
||||
"showFilePickerTrack": true,
|
||||
"langsInstalled": "installed langs",
|
||||
"src": "http://moodle.com/link/to/source",
|
||||
"srclang": "selected lang",
|
||||
"default": true,
|
||||
"langsAvailable": "avalialbe langs",
|
||||
"defaultTrack": true,
|
||||
"label": "selected track",
|
||||
"code": "lang code",
|
||||
"lang": "lang name"
|
||||
}
|
||||
|
||||
}}
|
||||
{{#media.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-video-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-video-lang-input" class="custom-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.metadata}}
|
||||
{{^media.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-video-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-video-lang-input" class="custom-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default">
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.metadata}}
|
||||
@@ -0,0 +1,145 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed/metadata/subtitles
|
||||
|
||||
Media preview footer template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
"media": {
|
||||
"tracks": {
|
||||
"subtitles": "subtitles"
|
||||
}
|
||||
},
|
||||
"showFilePickerTrack": true,
|
||||
"langsInstalled": "installed langs",
|
||||
"src": "http://moodle.com/link/to/source",
|
||||
"srclang": "selected lang",
|
||||
"default": true,
|
||||
"langsAvailable": "avalialbe langs",
|
||||
"defaultTrack": true,
|
||||
"label": "selected track",
|
||||
"code": "lang code",
|
||||
"lang": "lang name"
|
||||
}
|
||||
|
||||
}}
|
||||
{{#media.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-video-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32" value="{{src}}">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-video-lang-input" class="custom-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" name="Set default" class="form-check-input tiny_media_track_default" {{#defaultTrack}}checked{{/defaultTrack}}>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.subtitles}}
|
||||
{{^media.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-video-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-video-url-input" class="form-control tiny_media_source_url_entry" type="url" size="32">
|
||||
{{#showFilePickerTrack}}
|
||||
<span class="input-group-append">
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
</span>
|
||||
{{/showFilePickerTrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-video-lang-input" class="custom-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsInstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsInstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsAvailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsAvailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-video-track-input" class="form-control tiny_media_track_label_entry" type="text">
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default">
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/media.tracks.subtitles}}
|
||||
@@ -1,78 +0,0 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed_media_modal
|
||||
|
||||
Embed media modal template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
||||
{{< core/modal }}
|
||||
|
||||
{{$title}}
|
||||
{{#str}} modaltitle, tiny_h5p {{/str}}
|
||||
{{/title}}
|
||||
|
||||
{{$body}}
|
||||
<form class="tiny_media_form" id="{{elementid}}_tiny_media_form">
|
||||
<ul class="root nav nav-tabs mb-1" role="tablist">
|
||||
<li data-medium-type="link" class="nav-item">
|
||||
<a class="nav-link {{# link }}active{{/ link }}" href="#{{elementid}}_link" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} link, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-medium-type="video" class="nav-item">
|
||||
<a class="nav-link {{# video }}active{{/ video }}" href="#{{elementid}}_video" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} video, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-medium-type="audio" class="nav-item">
|
||||
<a class="nav-link {{# audio }}active{{/ audio }}" href="#{{elementid}}_audio" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} audio, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="root tab-content">
|
||||
<div data-medium-type="link" class="tab-pane {{# link }}active{{/ link }}" id="{{elementid}}_link">
|
||||
{{> tiny_media/embed_media_modal_link }}
|
||||
</div>
|
||||
<div data-medium-type="video" class="tab-pane {{# video }}active{{/ video }}" id="{{elementid}}_video">
|
||||
{{> tiny_media/embed_media_modal_video}}
|
||||
</div>
|
||||
<div data-medium-type="audio" class="tab-pane {{# audio }}active{{/ audio }}" id="{{elementid}}_audio">
|
||||
{{> tiny_media/embed_media_modal_audio}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{{/body}}
|
||||
|
||||
{{$footer}}
|
||||
<button type="button" class="btn btn-primary" data-action="save">
|
||||
{{#isupdating}}
|
||||
{{#str}} updatemedia, tiny_media {{/str}}
|
||||
{{/isupdating}}
|
||||
{{^isupdating}}
|
||||
{{#str}} createmedia, tiny_media {{/str}}
|
||||
{{/isupdating}}
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
||||
{{/footer}}
|
||||
|
||||
{{/ core/modal }}
|
||||
@@ -1,778 +0,0 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed_media_modal_audio
|
||||
|
||||
Embed media audio modal template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
||||
{{#audio.sources}}
|
||||
<div class="tiny_media_source tiny_media_media_source">
|
||||
<div class="mb-1">
|
||||
<label for="audio-audio-url-input">
|
||||
{{#str}} audiosourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="audio-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{.}}"/>
|
||||
{{#showfilepicker}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsource, tiny_media {{/str}}
|
||||
</a>
|
||||
{{#addsourcehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/addsourcehelpicon}}
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.sources}}
|
||||
{{^audio}}
|
||||
<div class="tiny_media_source tiny_media_media_source">
|
||||
<div class="mb-1">
|
||||
<label for="audio-audio-url-input">
|
||||
{{#str}} audiosourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="audio-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepicker}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsource, tiny_media {{/str}}
|
||||
</a>
|
||||
{{#addsourcehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/addsourcehelpicon}}
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio}}
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-display-options">
|
||||
<input name="mform_isexpanded_{{elementid}}_audio-display-options" type="hidden">
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#adisplayoptions" aria-expanded="false"
|
||||
aria-controls="adisplayoptions"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} displayoptions, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} displayoptions, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
</legend>
|
||||
<div id="adisplayoptions" class="fcontainer collapseable collapse px-1">
|
||||
<div class="tiny_media_display_options">
|
||||
<div class="mb-1">
|
||||
<label for="adisplayoptions_media-title-entry">{{#str}} entertitle, tiny_media {{/str}}</label>
|
||||
<input class="form-control fullwidth tiny_media_title_entry" type="text" id="adisplayoptions_media-title-entry"
|
||||
size="32" value="{{audio.title}}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-advanced-settings">
|
||||
<input name="mform_isexpanded_{{elementid}}_audio-advanced-settings" type="hidden">
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#aadvancedsettings" aria-expanded="false"
|
||||
aria-controls="aadvancedsettings"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} advancedsettings, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} advancedsettings, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
</legend>
|
||||
<div id="aadvancedsettings" class="fcontainer collapseable collapse px-1">
|
||||
<div class="tiny_media_advancedsettings">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" checked="true" class="form-check-input tiny_media_controls"
|
||||
id="aadvancedsettings_media-controls-toggle" {{# audio.controls }}checked{{/ audio.controls }}/>
|
||||
<label class="form-check-label" for="aadvancedsettings_media-controls-toggle">
|
||||
{{#str}} controls, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_autoplay"
|
||||
id="aadvancedsettings_media-autoplay-toggle" {{# audio.autoplay }}checked{{/ audio.autoplay }}/>
|
||||
<label class="form-check-label" for="aadvancedsettings_media-autoplay-toggle">
|
||||
{{#str}} autoplay, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_mute"
|
||||
id="aadvancedsettings_media-mute-toggle" {{# audio.muted }}checked{{/ audio.muted }}/>
|
||||
<label class="form-check-label" for="aadvancedsettings_media-mute-toggle">
|
||||
{{#str}} mute, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_loop"
|
||||
id="aadvancedsettings_media-loop-toggle" {{# audio.loop }}checked{{/ audio.loop }}/>
|
||||
<label class="form-check-label" for="aadvancedsettings_media-loop-toggle">
|
||||
{{#str}} loop, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_audio-tracks">
|
||||
<input name="mform_isexpanded_{{elementid}}_audio-tracks" type="hidden">
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#atracks" aria-expanded="false"
|
||||
aria-controls="atracks"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} tracks, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} tracks, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
{{#trackshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/trackshelpicon}}
|
||||
</legend>
|
||||
<div id="atracks" class="fcontainer collapseable collapse px-1">
|
||||
<ul class="nav nav-tabs mb-3">
|
||||
<li data-track-kind="subtitles" class="nav-item">
|
||||
<a class="nav-link active" href="#{{elementid}}_atracks_subtitles"
|
||||
role="tab" data-bs-toggle="tab">
|
||||
{{#str}} subtitles, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="captions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_atracks_captions" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} captions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="descriptions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_atracks_descriptions"
|
||||
role="tab" data-bs-toggle="tab">
|
||||
{{#str}} descriptions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="chapters" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_atracks_chapters" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} chapters, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="metadata" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_atracks_metadata" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} metadata, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div data-track-kind="subtitles" class="tab-pane active"
|
||||
id="{{elementid}}_atracks_subtitles">
|
||||
<div class="trackhelp">
|
||||
{{#subtitleshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/subtitleshelpicon}}
|
||||
</div>
|
||||
{{#audio.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-audio-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-audio-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-audio-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.subtitles}}
|
||||
{{^audio.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-audio-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-audio-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-audio-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.subtitles}}
|
||||
</div>
|
||||
<div data-track-kind="captions" class="tab-pane"
|
||||
id="{{elementid}}_atracks_captions">
|
||||
<div class="trackhelp">
|
||||
{{#captionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/captionshelpicon}}
|
||||
</div>
|
||||
{{#audio.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-audio-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-audio-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-audio-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.captions}}
|
||||
{{^audio.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-audio-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-audio-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-audio-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.captions}}
|
||||
</div>
|
||||
<div data-track-kind="descriptions" class="tab-pane"
|
||||
id="{{elementid}}_atracks_descriptions">
|
||||
<div class="trackhelp">
|
||||
{{#descriptionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/descriptionshelpicon}}
|
||||
</div>
|
||||
{{#audio.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-audio-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-audio-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-audio-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.descriptions}}
|
||||
{{^audio.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-audio-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-audio-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-audio-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.descriptions}}
|
||||
</div>
|
||||
<div data-track-kind="chapters" class="tab-pane"
|
||||
id="{{elementid}}_atracks_chapters">
|
||||
<div class="trackhelp">
|
||||
{{#chaptershelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/chaptershelpicon}}
|
||||
</div>
|
||||
{{#audio.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-audio-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-audio-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-audio-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.chapters}}
|
||||
{{^audio.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-audio-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-audio-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-audio-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.chapters}}
|
||||
</div>
|
||||
<div data-track-kind="metadata" class="tab-pane"
|
||||
id="{{elementid}}_atracks_metadata">
|
||||
<div class="trackhelp">{{{helpStrings.metadata}}}</div>
|
||||
<div class="trackhelp">
|
||||
{{#metadatahelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/metadatahelpicon}}
|
||||
</div>
|
||||
{{#audio.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-audio-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-audio-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-audio-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.metadata}}
|
||||
{{^audio.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-audio-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-audio-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-audio-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-audio-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-audio-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-audio-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/audio.tracks.metadata}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -1,41 +0,0 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed_media_modal_link
|
||||
|
||||
Embed media link modal template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
||||
<div class="tiny_media_source {{id}}">
|
||||
<div class="mb-1">
|
||||
<label for="source-url-input">
|
||||
{{#str}} entersource, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="source-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepicker}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="{{elementid}}_link_nameentry">{{#str}} entername, tiny_media {{/str}}</label>
|
||||
<input class="form-control fullwidth tiny_media_name_entry" type="text" id="{{elementid}}_link_nameentry" size="32" required="true"/>
|
||||
@@ -1,806 +0,0 @@
|
||||
{{!
|
||||
This file is part of Moodle - http://moodle.org/
|
||||
|
||||
Moodle is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Moodle is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
}}
|
||||
{{!
|
||||
@template tiny_media/embed_media_modal_video
|
||||
|
||||
Embed media video modal template.
|
||||
|
||||
Example context (json):
|
||||
{
|
||||
|
||||
}
|
||||
}}
|
||||
{{#video.sources}}
|
||||
<div class="tiny_media_source tiny_media_media_source">
|
||||
<div class="mb-1">
|
||||
<label for="video-video-url-input">
|
||||
{{#str}} videosourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="video-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{.}}"/>
|
||||
{{#showfilepicker}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsource, tiny_media {{/str}}
|
||||
</a>
|
||||
{{#addsourcehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/addsourcehelpicon}}
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.sources}}
|
||||
{{^video}}
|
||||
<div class="tiny_media_source tiny_media_media_source">
|
||||
<div class="mb-1">
|
||||
<label for="video-video-url-input">
|
||||
{{#str}} videosourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="video-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepicker}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsource, tiny_media {{/str}}
|
||||
</a>
|
||||
{{#addsourcehelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/addsourcehelpicon}}
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video}}
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_video-display-options">
|
||||
<input name="mform_isexpanded_{{elementid}}_video-display-options" type="hidden">
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#vdisplayoptions" aria-expanded="false"
|
||||
aria-controls="vdisplayoptions"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} displayoptions, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} displayoptions, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
</legend>
|
||||
<div id="vdisplayoptions" class="fcontainer collapseable collapse px-1">
|
||||
<div class="tiny_media_display_options">
|
||||
<div class="mb-1">
|
||||
<label for="vdisplayoptions_media-title-entry">{{#str}} entertitle, tiny_media {{/str}}</label>
|
||||
<input class="form-control fullwidth tiny_media_title_entry" type="text" id="vdisplayoptions_media-title-entry"
|
||||
size="32" value="{{video.title}}"/>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="mb-1">
|
||||
<label>{{#str}} size, tiny_media {{/str}}</label>
|
||||
<div class="d-flex flex-wrap align-items-center tiny_media_poster_size">
|
||||
<label for="vdisplayoptions_media-width-entry" class="accesshide">{{#str}} videowidth, tiny_media {{/str}}</label>
|
||||
<input id="vdisplayoptions_media-width-entry" type="text" class="form-control w-auto me-1 tiny_media_width_entry input-mini"
|
||||
size="4" value="{{video.width}}"/>
|
||||
x
|
||||
<label for="vdisplayoptions_media-height-entry" class="accesshide">{{#str}} videoheight, tiny_media {{/str}}</label>
|
||||
<input id="vdisplayoptions_media-height-entry" type="text" class="form-control w-auto ms-1 tiny_media_height_entry input-mini"
|
||||
size="4" value="{{video.height}}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<div class="tiny_media_source tiny_media_poster_source">
|
||||
<div class="mb-1">
|
||||
<label for="display-video-url-input">
|
||||
{{#str}} entersource, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="display-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{video.poster}}"/>
|
||||
{{#showfilepickerposter}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickerposter}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_video-advanced-settings">
|
||||
<input name="mform_isexpanded_{{elementid}}_video-advanced-settings" type="hidden">
|
||||
{{renderPartial "form_components.section" context=this id="vadvancedsettings" name="advancedsettings"}}
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#vadvancedsettings" aria-expanded="false"
|
||||
aria-controls="vadvancedsettings"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} advancedsettings, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} advancedsettings, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
</legend>
|
||||
<div id="vadvancedsettings" class="fcontainer collapseable collapse px-1">
|
||||
<div class="tiny_media_advancedsettings">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" checked="true" class="form-check-input tiny_media_controls"
|
||||
id="vadvancedsettings_media-controls-toggle" {{# video.controls }}checked{{/ video.controls }}/>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-controls-toggle">
|
||||
{{#str}} controls, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_autoplay"
|
||||
id="vadvancedsettings_media-autoplay-toggle" {{# video.autoplay }}checked{{/ video.autoplay }}/>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-autoplay-toggle">
|
||||
{{#str}} autoplay, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_mute"
|
||||
id="vadvancedsettings_media-mute-toggle" {{# video.muted }}checked{{/ video.muted }}/>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-mute-toggle">
|
||||
{{#str}} mute, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_loop"
|
||||
id="vadvancedsettings_media-loop-toggle" {{# video.loop }}checked{{/ video.loop }}/>
|
||||
<label class="form-check-label" for="vadvancedsettings_media-loop-toggle">
|
||||
{{#str}} loop, tiny_media {{/str}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="collapsible collapsed" id="{{elementid}}_video-tracks">
|
||||
<input name="mform_isexpanded_{{elementid}}_video-tracks" type="hidden">
|
||||
<legend class="d-flex align-items-center px-1">
|
||||
<div class="position-relative d-flex ftoggler align-items-center position-relative me-1">
|
||||
<a role="button" data-bs-toggle="collapse" href="#vtracks" aria-expanded="false"
|
||||
aria-controls="vtracks"
|
||||
class="btn btn-icon me-1 icons-collapse-expand stretched-link fheader collapsed">
|
||||
<span class="expanded-icon icon-no-margin p-2" title="{{#str}} collapse, moodle {{/str}}">
|
||||
<i class="icon fa fa-chevron-down fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="collapsed-icon icon-no-margin p-2" title="{{#str}} expand, moodle {{/str}}">
|
||||
<span class="dir-rtl-hide">
|
||||
<i class="icon fa fa-chevron-right fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="dir-ltr-hide">
|
||||
<i class="icon fa fa-chevron-left fa-fw " aria-hidden="true"></i>
|
||||
</span>
|
||||
</span>
|
||||
<span class="visually-hidden">{{#str}} tracks, tiny_media {{/str}}</span>
|
||||
</a>
|
||||
<h3 class="d-flex align-self-stretch align-items-center mb-0" aria-hidden="true">
|
||||
{{#str}} tracks, tiny_media {{/str}}
|
||||
</h3>
|
||||
</div>
|
||||
{{#trackshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/trackshelpicon}}
|
||||
</legend>
|
||||
<div id="vtracks" class="fcontainer collapseable collapse px-1">
|
||||
<ul class="nav nav-tabs mb-3">
|
||||
<li data-track-kind="subtitles" class="nav-item">
|
||||
<a class="nav-link active" href="#{{elementid}}_vtracks_subtitles"
|
||||
role="tab" data-bs-toggle="tab">
|
||||
{{#str}} subtitles, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="captions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_captions" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} captions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="descriptions" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_descriptions"
|
||||
role="tab" data-bs-toggle="tab">
|
||||
{{#str}} descriptions, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="chapters" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_chapters" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} chapters, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
<li data-track-kind="metadata" class="nav-item">
|
||||
<a class="nav-link" href="#{{elementid}}_vtracks_metadata" role="tab" data-bs-toggle="tab">
|
||||
{{#str}} metadata, tiny_media {{/str}}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div data-track-kind="subtitles" class="tab-pane active"
|
||||
id="{{elementid}}_vtracks_subtitles">
|
||||
<div class="trackhelp">
|
||||
{{#subtitleshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/subtitleshelpicon}}
|
||||
</div>
|
||||
{{#video.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-video-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-video-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.subtitles}}
|
||||
{{^video.tracks.subtitles}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="subtitle-video-url-input">
|
||||
{{#str}} subtitlessourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="subtitle-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="subtitle-video-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="subtitle-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="subtitle-video-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addsubtitlestrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.subtitles}}
|
||||
</div>
|
||||
<div data-track-kind="captions" class="tab-pane"
|
||||
id="{{elementid}}_vtracks_captions">
|
||||
<div class="trackhelp">
|
||||
{{#captionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/captionshelpicon}}
|
||||
</div>
|
||||
{{#video.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-video-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-video-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.captions}}
|
||||
{{^video.tracks.captions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="caption-video-url-input">
|
||||
{{#str}} captionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="caption-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="caption-video-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="caption-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="caption-video-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addcaptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.captions}}
|
||||
</div>
|
||||
<div data-track-kind="descriptions" class="tab-pane"
|
||||
id="{{elementid}}_vtracks_descriptions">
|
||||
<div class="trackhelp">
|
||||
{{#descriptionshelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/descriptionshelpicon}}
|
||||
</div>
|
||||
{{#video.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-video-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-video-ang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.descriptions}}
|
||||
{{^video.tracks.descriptions}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="description-video-url-input">
|
||||
{{#str}} descriptionssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="description-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="description-video-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="description-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="description-video-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} adddescriptionstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.descriptions}}
|
||||
</div>
|
||||
<div data-track-kind="chapters" class="tab-pane"
|
||||
id="{{elementid}}_vtracks_chapters">
|
||||
<div class="trackhelp">
|
||||
{{#chaptershelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/chaptershelpicon}}
|
||||
</div>
|
||||
{{#video.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-video-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-video-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.chapters}}
|
||||
{{^video.tracks.chapters}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="chapter-video-url-input">
|
||||
{{#str}} chapterssourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="chapter-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="chapter-video-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="chapter-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="chapter-video-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addchapterstrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.chapters}}
|
||||
</div>
|
||||
<div data-track-kind="metadata" class="tab-pane"
|
||||
id="{{elementid}}_vtracks_metadata">
|
||||
<div class="trackhelp">{{{helpStrings.metadata}}}</div>
|
||||
<div class="trackhelp">
|
||||
{{#metadatahelpicon}}
|
||||
{{> core/help_icon }}
|
||||
{{/metadatahelpicon}}
|
||||
</div>
|
||||
{{#video.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-video-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32" value="{{src}}"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-video-lang-input" class="form-select tiny_media_track_lang_entry" data-value="{{srclang}}">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-video-track-input" class="form-control tiny_media_track_label_entry" type="text" value="{{label}}"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default" {{# defaultTrack }}checked{{/ defaultTrack }}/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.metadata}}
|
||||
{{^video.tracks.metadata}}
|
||||
<div class="mb-1 tiny_media_track">
|
||||
<div class="tiny_media_source tiny_media_track_source">
|
||||
<div class="mb-1">
|
||||
<label for="metadata-video-url-input">
|
||||
{{#str}} metadatasourcelabel, tiny_media {{/str}}
|
||||
</label>
|
||||
<div class="input-group input-append w-100">
|
||||
<input id="metadata-video-url-input" class="form-control tiny_media_url_entry" type="url" size="32"/>
|
||||
{{#showfilepickertrack}}
|
||||
<button class="btn btn-secondary openmediabrowser" type="button">{{#str}} browserepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepickertrack}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-lang-input">{{#str}} srclang, tiny_media {{/str}}</label>
|
||||
<select id="metadata-video-lang-input" class="form-select tiny_media_track_lang_entry">
|
||||
<optgroup label="{{#str}} languagesinstalled, tiny_media {{/str}}">
|
||||
{{#langsinstalled}}
|
||||
<option value="{{code}}" {{#default}}selected="selected"{{/default}}>{{lang}}</option>
|
||||
{{/langsinstalled}}
|
||||
</optgroup>
|
||||
<optgroup label="{{#str}} languagesavailable, tiny_media {{/str}} ">
|
||||
{{#langsavailable}}
|
||||
<option value="{{code}}">{{lang}}</option>
|
||||
{{/langsavailable}}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="w-100" for="metadata-video-track-input">{{#str}} label, tiny_media {{/str}}</label>
|
||||
<input id="metadata-video-track-input" class="form-control tiny_media_track_label_entry" type="text"/>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input tiny_media_track_default"/>
|
||||
<label class="form-check-label">{{#str}} default, tiny_media {{/str}}</label>
|
||||
</div>
|
||||
<div class="addcomponent-wrapper">
|
||||
<a href="#" class="addcomponent">
|
||||
{{#str}} addmetadatatrack, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="removecomponent-wrapper hidden">
|
||||
<a href="#" class="removecomponent">
|
||||
{{#str}} remove, tiny_media {{/str}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/video.tracks.metadata}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -49,7 +49,7 @@
|
||||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel, moodle {{/str}}</button>
|
||||
{{#showfilepicker}}
|
||||
<!-- Row 3: Browse repositories button -->
|
||||
<button class="openimagebrowser btn btn-secondary" type="button">{{#str}} browserepositoriesimage, tiny_media {{/str}}</button>
|
||||
<button class="openimagebrowser btn btn-secondary" type="button">{{#str}} browseembedimagerepositories, tiny_media {{/str}}</button>
|
||||
{{/showfilepicker}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user