[Xerte-dev] Re: adding mp4 via the wysiwyg editor to sub pages etc?

Fay Cross Fay.Cross at nottingham.ac.uk
Wed Jul 8 10:51:52 BST 2015


Hi Ron

I made a start on the combined navigator page but have been side tracked by other things. I've just got as far as being able to swap between accordion/tabs/buttons/slideshow but haven't added the bits to add media to the panes yet. It shouldn't be much work now though so I'll try to get it done for the new release.

It would be good to have an easy way to add videos anywhere in any page though. Pages with video in don't use mediaelementplayer directly - they go through mediaPlayer which works out the correct path to the file (and also allows the source to be YouTube or Vimeo URL, allows for synching, specified start end frames etc.). It adds a video or audio tag to a holder tag so you would need to add a div rather than a video tag to the src and call it from there. Something like this:

<div id="videoHolder"></div>
<script>
$("#videoHolder ").mediaPlayer({
type: "video",
source: "FileLocation + video.mp4"
});
</script>

Fay


From: xerte-dev-bounces at lists.nottingham.ac.uk [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Julian Tenney
Sent: 07 July 2015 09:35
To: For Xerte technical developers
Subject: [Xerte-dev] Re: adding mp4 via the wysiwyg editor to sub pages etc?

I'm not sure but the starting point would be to figure out the path and then use a relative one in the src of <video> tag. You might then need to initialise the mediaelement stuff with $('audio,video').mediaelementplayer(); if that doesn't happen on the particular page, and you might need an event to tell you when the page has finished being created?

Something like:

<video src="../USER_FILES/123-abc-def/media/blah.mp4">
<script>
$('audio,video').mediaelementplayer();
</script>

might work. If I get a chance later I'll see if I can make it work

From: xerte-dev-bounces at lists.nottingham.ac.uk<mailto:xerte-dev-bounces at lists.nottingham.ac.uk> [mailto:xerte-dev-bounces at lists.nottingham.ac.uk] On Behalf Of Ron Mitchell
Sent: 06 July 2015 21:37
To: 'For Xerte technical developers'
Subject: [Xerte-dev] adding mp4 via the wysiwyg editor to sub pages etc?

Hi
following a discussion and question from Alistair just wondering about this and not thinking straight :-(

Is there's a way to add some script in source view (notts template xerte 3) to embed an mp4 in any page or nested page with a filelocation link, rather than full url, and have the video display with the player controls and also crucially still work when exported for offline use without an online connection? e.g. rather than adding an optional video property to each navigator page, like there is an optional image property in the navigators, I'm wondering if there's a way to fire the media player and pass a file name uploaded to the media folder all via script so that this could work on any page?

I guess longer term a custom button in the editor, like the one for Flash or online media, might be the answer but wondering about a quick cheat via script?

Any suggestions?

Fay - where did you get to with the combined Navigator including video in sub pages? Is that for a future release or for Xerte 3 final?

Cheers
Ron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20150708/cbd915e6/attachment-0001.html>


More information about the Xerte-dev mailing list