7 Replies Latest reply on Oct 4, 2006 4:38 PM by Newsgroup_User

    Add fullscreen feature to flv player

    bbrevet
      I have an flv player that I designed for my site but I can't seen to find a tutorial on how to add a fullscreen feature to it, can anyone point me to one or advise me on how to do it?

      Thanks!
        • 1. Re: Add fullscreen feature to flv player
          Nickels55 Level 2
          I don't think that feature exists for progressivly streamed videos. You have to put your file on a media server to get full screen capabilities. For progressive videos I think you have to fake it using actionscript, but I haven't seen it done yet so I don't know the code.
          • 2. Re: Add fullscreen feature to flv player
            Level 7


            Nickels55 wrote:
            > I don't think that feature exists for progressivly streamed videos. You have to
            > put your file on a media server to get full screen capabilities. For
            > progressive videos I think you have to fake it using actionscript, but I
            > haven't seen it done yet so I don't know the code.

            That would be incorrect.
            http://flashfugitive.com/stuff/flv_full/
            Use UP and DOWN key to toggle between full and regular window.





            --
            Best Regards

            Urami


            --


            <urami>
            If you want to mail me - DO NOT LAUGH AT MY ADDRESS
            </urami>
            • 3. Re: Add fullscreen feature to flv player
              Level 7


              bbrevet wrote:
              > I have an flv player that I designed for my site but I can't seen to find a tutorial on how to add a fullscreen feature to it, can anyone point me to one or advise me on how to do it?
              >
              > Thanks!



              resizer = new Object;
              resizer.onResize = function()
              {
              (isOriginal) ? setOriginal() : setFullScreen();
              }
              Stage.addListener(resizer);
              Stage.align = "TL";
              Stage.scaleMode = "noscale";
              var isOriginal:Boolean = true;

              onLoad = function()
              {
              setup();
              resizer.onResize();
              }
              function setup()
              {
              original_width = 320; // normal be from metadata
              original_height = 240; // normal be from metadata

              player.maintainAspectRatio = false;
              player.autoSize = false; // i will control size
              player.contentPath = "YOUR_VIDEO_FILE_HERE.flv"; // load file
              setOriginal()
              setKeyControls();
              }
              function setKeyControls()
              {
              var kControl = new Object;
              kControl.onKeyDown = function()
              {
              if(Key.isDown(Key.DOWN))
              {
              setFullScreen()
              } else
              if(Key.isDown(Key.UP))
              {
              setOriginal();
              }
              }
              Key.addListener(kControl);
              }
              function setOriginal()
              {
              isOriginal = true;
              player.setSize(original_width,original_height);
              player._x = (Stage.width/2)-(original_width/2)
              player._y = (Stage.height/2)-(original_height/2);
              }
              function setFullScreen()
              {
              isOriginal = false;
              player._x = 0;
              player._y = 0;
              player.setSize(Stage.width,Stage.height);
              }


              Now you can toggle your FLV playback component full and regular window with
              Up and Down arrow keys...


              regards


              Urami
              • 4. Re: Add fullscreen feature to flv player
                Nickels55 Level 2
                Where the heck did you pull that code from? I have never seen anything like that... sweet! Lee Brimlow didn't cover that in any of the tutorials that I've seen.

                U r so s-m-r-t.

                I wasn't totally incorrect, because I knew it had to be done using actionscript. Thanks for the tip! Also, it looks like you can basically mess with that code to make it controlled by a button or whatever key you want. I am so stealing that!!!
                • 5. Re: Add fullscreen feature to flv player
                  bbrevet Level 1
                  Thanks so much for this, I am going to tool around with it tonight and hopefully get it to work with a button. If I am successful I will post the code if anyone is interested. Also if someone else gets it done before me please post the code as I think this would help a lot of people.
                  • 6. Re: Add fullscreen feature to flv player
                    hey I've been looking for actionscript like this for too long.
                    Thing is I can't get it to work with my player, though that's because I'm using an XML playlist to feed the player with videos, so I can't just enter what video I want to play into this code, as I'm trying to create a service of multible videos (its for my job)
                    Any help would be great
                    • 7. Re: Add fullscreen feature to flv player
                      Level 7


                      uni5 wrote:
                      > hey I've been looking for actionscript like this for too long.
                      > Thing is I can't get it to work with my player, though that's because I'm
                      > using an XML playlist to feed the player with videos, so I can't just enter
                      > what video I want to play into this code

                      Why not ?
                      of course possible, instead of file name just use appropriate value from you
                      xml file. This code is not single file constrained, it can easily load dynamic
                      files in run time.
                      Don't know how you deal with your xml so I can't tell you what to do. I would
                      create some array than pick the item from the array
                      linkArray[parseInt(this._parent._name)] and use it instead of the actual
                      file name. Loading more is not difficult either:
                      player.load("reel.flv");
                      player.play();

                      or

                      player.load(linkArray[parseInt(this._parent._name)]);
                      player.play();


                      --
                      Best Regards

                      Urami


                      --


                      <urami>
                      If you want to mail me - DO NOT LAUGH AT MY ADDRESS
                      </urami>