Embed videos in my screen

Hi all

I have a problem of integration of video in a form with fields.

I want to just make screen with video and play, stop, and Pause buttons.

Here is the code for my player screen. I added the necessary fields and the video control, but once the player starts to play the video plays in another window.

Am not able to maintain control over the video. Play, Pause, Stop buttons are useless and they are not even present.

I just went through the samples of devResources

http://supportforums.BlackBerry.com/T5/Java-development/sample-code-how-to-add-video-to-your-UI/Ta-p...

but no use.


public PlayerScreen(String vUrl)    { 

      super(NO_VERTICAL_SCROLL);

      imgPause = Bitmap.getBitmapResource("playerImages/Button_Pause.png");        imgPlay = Bitmap.getBitmapResource("playerImages/Button_Play.png");        isplay = true;

        btnPlay = new BitmapField(imgPause,BitmapField.FOCUSABLE|ButtonField.CONSUME_CLICK)       ;

      imgStop = Bitmap.getBitmapResource("playerImages/Button_Stop.png");       btnStop = new BitmapField(imgStop,BitmapField.FOCUSABLE|ButtonField.CONSUME_CLICK)         ;

          imgReplay = Bitmap.getBitmapResource("Button_Replay.png");        btnReplay = new BitmapField(imgReplay,BitmapField.FOCUSABLE|ButtonField.CONSUME_CLICK)       ;

      playerMenuLayer = Bitmap.getBitmapResource("playerImages/Button_Background.png");     bottomBar = Bitmap.getBitmapResource("surveyimages/bgseat.png");      bottomBar = ResizeImage.resizeBitmap(bottomBar, AppConstants.DEVICE_DISPLAY_WIDTH, 50);

       Thread thread = null;

        try        {                _player = Manager.createPlayer(vUrl);            _player.addPlayerListener(this);            _player.realize();            _videoControl = (VideoControl)_player.getControl("VideoControl");            if(_videoControl != null)            {

                _videoField = (Field)_videoControl.initDisplayMode(0, "net.rim.device.api.ui.Field");                _videoControl.setDisplaySize(AppConstants.DEVICE_DISPLAY_WIDTH, AppConstants.DEVICE_DISPLAY_HEIGHT-(27+bottomBar.getHeight()));

                _videoControl.setVisible(true);            }add(_videoField);

            UiApplication.getUiApplication().invokeLater(new Runnable()             {

                public void run()                {                    try                    {                        _player.prefetch();                        _player.start();                    }                    catch(Exception e)                    {                        //GlobalSettings.setErrorLog(e.toString());                    }                }

            }, 1000L, false);

          progressBar = new ProgressBar();          add(progressBar);

           hfmBottom = new HorizontalFieldManager()           {            public void paint(Graphics graphics)               {                     graphics.drawBitmap(0, 0,bottomBar.getWidth() ,bottomBar.getHeight(), bottomBar, 0, 0);                                   graphics.drawBitmap((bottomBar.getWidth()/2)-(playerMenuLayer.getWidth()/2),5,playerMenuLayer.getWidth() ,playerMenuLayer.getHeight(),playerMenuLayer,0,0);                                    super.paint(graphics);               }           };

           hfmBottom.add(btnReplay);           hfmBottom.add(btnPlay);           hfmBottom.add(btnStop);

           add(hfmBottom);           (thread = new Thread(this)).start();        }        catch(Exception e)        {         Tools.print("XCO: PlayerScreen: Error While playing media: " + e.toString());        }    }   protected void paint(Graphics graphics)   {       graphics.setBackgroundColor( 0x000000 );            graphics.clear();

           // calling super.paint() will create the white background         // so instead we will call subpaint() ourselves           subpaint( graphics );     //super.paint(graphics);  }

    public void run()    {        do        {            progressBar.update(_player.getState() == 400, (int)(_player.getMediaTime() / 0xf4240L), (int)(_player.getDuration() / 0xf4240L));            try            {                Thread.sleep(200L);            }            catch(Exception e) { }        } while(true);    }

Thank you friends!

Just to update, I have solved my problem.

I am motivated to Blackberry Media Player, and I prepared the player who is close to BB Media Player (not that exactly matches...   ).

I'll share my code here.

Tags: BlackBerry Developers

Similar Questions

  • the toolbar disappears after videos in full screen

    I use FirefoxDeveloperEdition 40.0a2, with OSX 10.10.3.
    After that I put a youtube video in full screen and then return to the normal view, the toolbar (bookmarks) disappeared. Everything is always resolved the way it's supposed to (display the toolbar and so on). After that I restarted firefox everything is back to normal. I removed all disabled all addons, but it has not changed anything. Any ideas how to solve this problem?

    First of all, I must add that if I open a new window, the toolbar is displayed in this window, not in the old. If a reboot is not necessary after all.

    Of course, I tried to set the toolbar to display again. But as I said in my post, all options are always set on the view toolbar, it is not just seen.

    I have updated all the plugins, one at a time and tried again.
    The problem is still there.

    I managed to circumvent the problem. As far as I can tell the problem occurs only on the youtube page, using the HTML5 player. YouTubeFlashPlayer an extension that forces youtube use Flash Player instead of HTML5, I installed a. This fixes the problem.

  • Framerate low when watching Youtube on HTML5 videos in full screen

    Since Firefox makes Youtube videos only play in HTML5, no matter what quality setting that I have video that I look at, when I watch the video on full screen there low framerate. This problem does not occur with other video sites that uses Flash, as shaking, Blip or Dailymotion.

    Is this software is tied to the browser or related material with it being HTML5?

    Automatically search for updates for your graphics card using the above.

  • How to stop the taskbar of the projection when I watch a video in full screen?

    When I watch a video with Mozilla Firefox on sites like YouTube, Google Video, or Bing video in full screen, the taskbar displays at the bottom of my screen and does not go away as it does in Internet Explorer. How can I watch the videos in full screen without the taskbar to display? There isn't a Web site problem, it is not a Windows problem, it does only on the Mozilla browser. All three Web sites read perfect fullscreen video on the Internet Explorer browser with no taskbar indicating at the bottom...

    Hello Tomcost,

    I knew this problem myself and managed to find this solution by searching the forums.

    Right-click on the icon of your Firefox (not the one of your task bar), if it is not on your desktop, find it in Mozilla Firefox program folder.

    After that right click, select Properties, then the Compatibility tab, then check the box that says that turn off the timing of the high DPI settings display.

    Please let us know if it works for you.

    See you soon,.
    Patrick

  • Trying to copy a video on my DVD recorder via AV connection with adapter. Audio is fine, but no video on the screen

    Trying to copy a video to my iPad Pro on my DVD recorder via AV connection with adapter. Audio is fine, but no video on the screen

    Which sector adapter are you using?  The digital adapter AV output is digital, which is not compatible with analog VCR.

    iOS: on adapters AV digital Apple

  • Windows Media Player 11 doesn't show video in full screen

    Original title: Windows Media Player 11

    Windows Media Player 11 shows no video mode full-screen. How to fix?

    Hi Rich HSY,
     
    Try the methods listed in this article to resolve the problem:
     
    Note: The information in this section are applicable to the Media Player 11 for Windows XP as well.
  • Vista WMP I can't watch the video in full screen

    Vista WMP I can't watch the video in full screen or any size other than 100%...if that I change of 150% or 200%, it only shows the screen completely black but sound pieces as usual...

    Hi the Justice Clark,

     

    1. what version of WMP are you running?

    2. to check the press ALT on your keyboard and then click Help on

    3. what type of file you are playing?

    4. What is the file format?

    Update drivers please follow the link below.

    www. Microsoft.com/downloads/en/default.aspx

  • Take a video of the screen

    I don't know if this is related to Windows or not, if not please direct me. I saw on YouTube, people make videos of the screen - similar to a screenshot, but a video. How can I do this? What is an app or something with a video camera? Help is appreciated.

    There is an application built into windows called step recorder, or something similar that will record when you move the mouse and on what keys this week not however show the desktop or any other application. To save your desktop, you will need to install an application usually with the description of the screen capture software.

  • What program to use to take the video of your screen? AND: How to convert .swf in .mp4?

    What program (free) can I use on my HP laptop (running on Windows 7) to take video of my screen? I used Jing to capture video, but it registers as a .swf file. I have not anything that can play a .swf. I tried Zamzar, but he's not convert .swf files. So, what can I use to convert the .swf in .mp4, please?

    I tried to download CamStudio, but Google Chrome has blocked, saying that the zip file would affect my browsing experience.

    I'm not a technology person. Any help is appreciated. Thank you.

    DM

    If you want a basic registration application that TechSmith is also Snaggit that will record audio and video, making the screenshots & is $ 49 for life.  Your call.

  • Hi all! Is it possible to display the text on the video in full screen?

    Hello

    My problem is that I have to present a video in full-screen and must present a dynamic text on the video.

    We succeed in BB?

    Thank you and best regards,

    Mahendra SIngh

    N ° paint on top a video is not currently supported.

  • How can I create a video Viewer full screen?

    You want to create a video Viewer full screen like the one used here: Airbnb (video humanity).

    I want to be able to press a button and for my video to play in full screen

    Thank you

    Ali

    You can use the composition for this, insert video code or widget in jQuery containing: trigger action.

    Video Lightbox (Composition Widget) by Christine Ricks

    Thank you

    Sanjit

  • Embed videos - offline in Muse

    I have to add video content on a site that do im. The site should be usable offline also (on a memorystick) I need currently off-video.

    I've seen a lot of solution around place online video - but nothing for all offline.

    I would be very grateful for any help for my problem.

    Hello

    You can use HTML5 video tags for this purpose. Please refer to these tutorials:

    http://www.w3schools.com/HTML/html5_video.asp

    YS http://www.htmlgoodies.com/HTML5/client/How-to-Embed-Video-using-HTML5.html#fBid=vTx6Y2rBG

    http://www.Webmonkey.com/2010/05/embed-videos-in-your-Web-pages-using-HTML5/

    https://developer.Mozilla.org/en-us/docs/Web/Guide/HTML/Using_HTML5_audio_and_video

    Also while using the video tags, while pointing to the source of your video, you can specify the path to the video recorded locally and you'll be all set.

    Hope this helps

    Kind regards

    Rohit Nair

  • Pause slide with embed videos

    Hello users of the Adobe Forum.

    I have been using Adobe Captivate for a few months now, but I came across a problem that I can't solve by myself, so I hope I can find an overview here.

    I am currently using 8 Captivate and try to get my embed videos work properly. I have the video embedded Vimeo works pretty well, but I wonder if there is a way to pause the slide until the video itself arrives at the end I have considered adding a button in the user can proceed to the next slide manually when they are done or just do the slide exactly the length of the video duration He goes to the next slide automatically when it's done, but ideally, I want the user to be able freely to pause and play the video embed and only when the video ends engages the Captivate project to the next slide.

    I would really appreciate the help, thank you for your time.

    Hello

    This one is difficult. The thing is, your video is hosted on Vimeo. Not that this is a bad thing, but it's a variable into the mix. If you downloaded the video and added in Captivate as a video of the event, you could time for the 'rest of Slide' and the slide should simply stay in view until the finished video game. But coming from Vimeo, there is no way that I am aware of what the end of the video could be detected.

    You can try the slide timing, but the problem here is that you have no guarantee of the actual time it takes for the video to play. On slower connections, video can buffer for an indefinite period before the game starts or starts again.

    If that's the path, on that you have to stay, I guess that the approach "to insert a button" is probably the best you can do.

    See you soon... Rick

  • Embed videos not played with FP 10 and 11

    Hello

    Cannot watch embed videos in the latest versions of FP 10 and 11, before that I had no problem running on W7 and IE9.

    For example: if I'm on facebook (to name a few) and I click on any video, I hear them, but video goes black with a few flashes of the vid itself.  If I go on youtube (to cite that) I can look and see that same video.

    The only thing I did to my PC is upgraded FP.

    I tried everything what adobe suggest before coming here.

    Thank you

    "endMatchExclusive ="8.15.0010.1995"startMatchInclusive ="8.15.0010.1986"deviceID ="0 x 0046"vendorId ='0 x 8086" umdFilename = "igd10umd32.dll" / ><>

    Driver name: igdumd64.dll, igd10umd64.dll, igdumdx32 igd10umd32

    The driver file version: 8.15.0010.1968 (English)

    Your driver is not on the list approved for GPU rendering, so you can check that on the Internet options, advanced, use software rendering instead of GPU rendering is checked.

  • Embed videos from YouTube - Digital Publishing Suite help

    Hi all!

    I use Adobe InDesign and tools DPS to build an application.

    I need to be able to embed a video in one of two ways and runnning in some problems on YouTube. I know how to integrate video directly into the document for example by pasting the following text:

    " < iframe width ="560"height ="315"src =" http://www.YouTube.com/embed/I9_SR02HQIE "frameborder ="0"allowfullscreen > < / iframe > "

    It works if I want just the video directly on the page, but I really want is a button that says 'Watch Video' and when the user clicks, opens YouTube video and playes, preferreably full screen or lightbox style?

    Otherwise, I would like to embed the YouTube video within a floating framework. So, here's what I have:

    screenshot.jpg

    I have the content I want that the user must be able to be drag/push upward and inside, is embedded video youtube using the embed above code. However, when you select the frame of the placement, coaching "Scrollable" is grayed out. If I take the video, the floating framework is available.    -_-

    Can anyone help me please with either, or both of these solutions? You will be still my hero!

    Thank you.

    Create a State two MSO. Put the Youtube video in the second State first State a block empty. Have a button go to State 2.

    Forget to put in a scrolling frame.

Maybe you are looking for

  • Dilemma of numbers

    I can not anywhere on this with Excel for Mac 2008, so I thought I'd try numbers.  Help is greatly appreciated. I have a database that l would look like this: A                  B          C             D            E            F           G 1 Apple

  • backup problems

    Hello If I want to make a backup of my iPhone iCloud 5, I always remove your backup previous because otherwise it will not work. I have enough space left the iCloud storag because your backup takes 490 MB and after completing the backup, there are st

  • Bluetooth settings lost on the Satellite L850D - 12 p

    I seem to have 'lost' my Bluetooth settings, including the icon at the bottom of the screen.I tried to download a driver, but I'm not sure I have the right pair. I downloaded the driver Package version Realtek Bluetooth filter 12.28.2013.0912 81.5 MB

  • Sdatellite M100 does not recognize the CD/DVD drive in Windows XP

    It is listed in the Device Manager, but with a yellow explanation mark.No mention of this in my computer.No icon. I am able to open the drawer and I put several types of cd/DVD in them without any result.The light flashes in orange on the door. The d

  • Module e/s NI 5761 clock compiled 0 to 100 MHz in single/multiple Sample CLIP examples of projects

    Hello I was trying to wrap my head around the CLIP sample NI 5761 Multi (v4.1.0) because the CLIP provides 250 PSM data, but the IO module requires a clock of 200 MHz.  I think, ' NOR should handle the conversion of the clock, fine, but I hope that t