Author Topic: [UPDATE] My own "video" element for megazine 2.0.3b & 2.0.6 with full screen  (Read 3353 times)

rudy

  • Newbie
  • *
  • Posts: 11
Good evening,

I don't know if I can post my own element in the forum. (If not, please remove this post).

To be brief, I created my own video element (directly based on the vid element with the same behaviour) in the megazine code but no more vidgui support (I use the flash "Video" object). If you want a vidgui support, please use the "vid" tag !
When you click on the video, the video fullscreen is activated (If the video is not playing i.e. autoplay="false", the first click starts the video)
I had to modify the "ElementProxy.as" file in order to add the tag "video" (only a few lines).

Example : <video src="src/myst.flv" left="93" top="225" width="215" height="161"/>

The video flash object seems to have a bug with the video size in adobe flash 9.0. I use a workaround to avoid this problem.

In attachments, you can find the source for the two versions of the video elements and the compile megazine version (please use the svn tags v2.0.3b if you want to compile the source !)

Don't hesitate to give me feedback.

Regards,
Rudy


edit : update to version 2.0.6 + Escape bug correction (see fifth post for files)
« Last Edit: March 26, 2010, 09:17:34 am by rudy »

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1985
  • MegaZine3 Developer
    • MegaZine3
Re: My own "video" element for megazine 2.0.3b with full screen
« Reply #1 on: December 27, 2009, 06:14:16 pm »
I don't know if I can post my own element in the forum.

We're happy if you do so, in fact :) Thanks for the contribution.

Moved to user contributions.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.

rbaybayan

  • Full Member
  • ***
  • Posts: 54
Re: My own "video" element for megazine 2.0.3b with full screen
« Reply #2 on: January 16, 2010, 05:21:51 pm »
Hi,
I am new to megazine and would appreciate if you can post a complete sample.


Thanks,

Ruel 

qsBat

  • Newbie
  • *
  • Posts: 2
Re: My own "video" element for megazine 2.0.3b with full screen
« Reply #3 on: March 11, 2010, 10:01:30 am »
Hi guys!

What a nice contribution! It will help me a lot :)

But I found a little bug with fullscreen exiting management. When you are playing a video in fullscreen mode, if you first hit escape key the swf exit fullscreen mode of your screen, but video is still in fullscreen within the browser window. I have to hit the escape key a second time to have the video in normal mode.

Moreover, video is in repeat mode. How can we play it just one time?


Thanks all!

rudy

  • Newbie
  • *
  • Posts: 11
NEW version 2.0.6
« Reply #4 on: March 25, 2010, 02:35:52 pm »
Hi,

The use of "video" tag is the same as the "vid" tag but it doesn't support the gui and guicolor attributes !
See the wiki : http://megazine.mightypirates.de/wiki/index.php/Video

By example, qsBat, if you want to play it only once, add an attribute   loop="false"   and the video will stop after playing once (if you click on the stopped video, the video will first restart)
Example : <video  src="vid/example.mp4" left="33" top="308" width="350" autoplay="true" onlywhenactive="true" restart="false" loop="false"/>   

For the "Escape" bug, I have corrected in the version below 2.0.6 (only) !
To compile the source, use the svn tag 2.0.6.

Regards,
Rudy
« Last Edit: March 26, 2010, 09:20:15 am by rudy »

charlintoweb

  • Newbie
  • *
  • Posts: 10
Hello Rudy,

The video tag works great, thank you.

May I ask why did you remove the gui support? and is there a version with the gui support in?


Thank you.

rudy

  • Newbie
  • *
  • Posts: 11
Hi Charlintoweb,

I didn't remove them but I didn't implement them because I don't know which events are sent by the vidgui (i.e. skin) ... The skin (vidgui) is directly "attached" to a compiled library FLVPlaybackAS3.swc and I didn't have the source code of this lib since it seems to be an adobe component.
Moreover, I'm not an expert in flash; I can program in flash with flex sdk (and flashdevelop) but I don't have any knowledge in Adobe Flash CS ...

Maybe, if someone knows how I can determine the events of the vidgui, I could try to implement it ...


Regards,
Rudy
« Last Edit: April 15, 2010, 01:04:03 pm by rudy »

charlintoweb

  • Newbie
  • *
  • Posts: 10
Hello Rudy,

Thank you.
Have you tried using it with the gui before and did it give any issues?
I myself have very little knowledge of AC3 even AC in general.
I have noticed that the GUI section is only commented out.

Due to the little experience I have with flash, I cant compile the system myself with the un-commented  gui code else I would have tried to see what happens myself.

Thank you.


rudy

  • Newbie
  • *
  • Posts: 11
Hello Charlintoweb,


It will not work because the class video doesn't support a skin (gui attribute) ...
Maybe it would be possible if I change other thing in the original code ...
If I have time, I will try to look at it ...

For info, in the wiki, you can find the info to compile the sources : http://www.megazine3.de/wiki/index.php/Compiling

Regards,
Rudy