Page 1 of 1

video and audio shortCode

Posted: Tue Jul 11, 2017 7:01 pm
by elGringo
Hello. Doing component consisting of rve and memo with toggle mode. Memo contains HTML exported from rve through SaveHTMLEx. As a result program will read html from db and give it to browser.

1. text and tables ok - it works from the box.
2. pictures. solved in neighbour http://www.trichview.com/forums/viewtop ... f=2&t=8777.

3. video mp4 ?
4. audio mp3?
5. attachment ?

as for 3,4,5 I have an idea how to do this - but not sure how to do that better using rve. So, my idea

VIDEO

in rve i will write some shortCode like

[VIDEO] src=srcValue; w=wValue; h=hValue; poster=posterValue [/VIDEO]

then using some event of rve, for example OnSaveItemToFile, i will export to HTML memo code like this

Code: Select all

  <video width="400" height="300" controls="controls" poster="video/duel.jpg">
   <source src="video/duel.ogv" type='video/ogg; codecs="theora, vorbis"'>
   <source src="video/duel.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
   <source src="video/duel.webm" type='video/webm; codecs="vp8, vorbis"'>
   Тег video не поддерживается вашим браузером. 
   <a href="video/duel.mp4">Скачайте видео</a>.
  </video>
  
But how to insert in rve when switching from HTML mode to rve?

So, my questions

-is that good idea of implementing video, audio and attachment to document or not, maybe there are some easier ways of deciding task?
-how to insert in rve when switching from HTML mode to rve?

Or maybe it is not real task

I have media files near server which I want to start from browser (mp3, mp4, attachments, and so on)

Re: video and audio shortCode

Posted: Wed Jul 12, 2017 7:58 am
by elGringo
desided to change shortcodes on html equivalents before giving it to browser
think it is easy decision for the moment

it will be

Code: Select all

[VIDEO] src=srcValue; w=wValue; h=hValue; poster=posterValue [/VIDEO]
in rve and HTML memo up to the moment of giving it is to browser

when will give to browser - change to HTML equivalent

Re: video and audio shortCode

Posted: Wed Jul 12, 2017 12:18 pm
by Sergey Tkachenko
Yes, you need to find some workaround for your application, because our HTML importers do not support reading custom content, like controls or video.