mnkdon / flash-videoio

Automatically exported from code.google.com/p/flash-videoio
0 stars 0 forks source link

Picture-in-Picture capabilities #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I need to create a little web conference application with picture-in-picture 
capabilities. That means, the user needs to be able to see himself in a little 
square area of the player and see the other person in the rest of the player 
(window or full-screen mode).

Are there any plans of implementing something like that in the very near future?

Thanks a lot for your time.

Gonzalo

Original issue reported on code.google.com by gonzalo....@door3.com on 23 Aug 2011 at 8:16

GoogleCodeExporter commented 9 years ago
Nothing planned yet, because I believe you can achieve the same effect using 
embedding VideoIO.swf in another Flash application or in HTML.

I created an example page at http://myprojectguide.org/p/flash-videoio/pip.html 
to test out this feature. You need Flash Player 10.3 or later. Use rtmplite's 
server for a quick test. You can view the source and incorporate similar code 
in your HTML. 

For embedding in HTML there are certain restrictions e.g., the minimum 
dimension of the smaller VideoIO must be 215x138 and full-screen mode is for 
each VideoIO. To avoid these restrictions you can embed the two VideoIO.swf in 
another Flash application. Please see 
http://myprojectguide.org/p/flash-videoio/12.html for details.

If you have difficulty getting this to work on your browser or have something 
which is not working, please let me know and we will look in to it...

Original comment by kun...@twilio.com on 23 Aug 2011 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by kundan10 on 23 Aug 2011 at 10:14

GoogleCodeExporter commented 9 years ago
Thanks a lot for this information! Sorry if my question/request was a little 
dumb, but I'm not familiar at all with Flash development. However, I'll need to 
get involved with this (or ask someone to) and try embedding VideoIO.swf in 
another Flash application (because I need to be able to do Full-screen with PIP 
functionality).

Thanks again for the info, and for the quick reply.

I'll let you know the results.

Original comment by gonzalo....@door3.com on 23 Aug 2011 at 10:34

GoogleCodeExporter commented 9 years ago
I created http://myprojectguide.org/p/flash-videoio/VideoPIP.html that 
demonstrates how to use VideoPIP.swf which combines the two VideoIO instances 
for picture-in-picture in a single Flash application. The HTML file also shows 
how you can set/get certain properties and styles of outer and inner VideoIO as 
well as corresponding SWFLoader. Ideally you should be able to use VideoIO.swf 
yourself. If you need to change that the source code is also available linked 
from the HTML page above.

Good luck with your application!

Original comment by kundan10 on 24 Aug 2011 at 6:41

GoogleCodeExporter commented 9 years ago
I didn't have time to thank you for this. I really thank you for your help! 
I'll have a closer look at this tonight, but it seems really promising...

Thanks again, Gonzalo

Original comment by gonzalo....@door3.com on 26 Aug 2011 at 6:12

GoogleCodeExporter commented 9 years ago
Hi Kundan, I'm trying to create a custom control bar for the PIP control.
I'm having difficulties implementing the "Full screen" button.
This is what I'm doing:

{{{
private function toggleFullscreen():void
            {
                if(StageDisplayState.FULL_SCREEN == stage.displayState) {
                    stage.displayState = StageDisplayState.NORMAL;                  
                }
                else {
                    stage.displayState = StageDisplayState.FULL_SCREEN;
                }

            }

}}}

This code is not working, the control goes to fullscreen mode, but the video of 
the "outer" stream does not expand to fit the entire screen.

Do you know what's wrong with this approach?
Thanks in advance.

Original comment by gonza.vi...@gmail.com on 6 Sep 2011 at 4:56

GoogleCodeExporter commented 9 years ago
Hi Gonzalo, 
If you can send your full source file and/or screen shot of how it looks on 
full screen (send to my kundan10@gmail.com address), I may be able to give 
better advice. I assume you are using a wrapper MXML file that loads two 
VideoIO.swf using two SWLLoader similar to 
myprojectguide.org/p/flash-videoio/VideoPIP.mxml. 

One suggestion is to use 100% for width and height of inner SWFLoader. If you 
are using actionscript, then use the percentWidth property of SWFLoader.
Setting stage.displayState to fullScreen will typically only adjust the main 
Application to 100% of screen. Depending on how the child components of the 
main Application are laid-out, the inner components may or may not expand. If 
inner component is 100% of main Application, then inner one will expand too I 
think.

Original comment by kundan10 on 6 Sep 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Thanks for the reply. I still can't beleive this got me stuck for an entire 
day...
I finally got it working. I had set a fixed "height" in the Application tag, 
removed it, and fullscreen worked!

Thanks for your time.

Original comment by gonza.vi...@gmail.com on 8 Sep 2011 at 12:48