VideoView for full screen and non-full screen

Tutorials with advanced 'difficulty' and more Lines of Code.

VideoView for full screen and non-full screen

Postby garywang » Thu Dec 31, 2009 7:14 am

Dear all,

For Android application, I know creating a new media player is big effort.

I create a application for video player (on-line streaming) in two modes: normal size & full screen. But, for those modes, I always creates new media player instance for new streaming playing (by new VideoView for each operation).

Can I use only one VideoView to switch two display modes by changing its width & height size? How to?

Thanks for your help!

Gary
User avatar
garywang
Junior Developer
Junior Developer
 
Posts: 19
Joined: Tue Sep 09, 2008 8:22 am
Location: Taipei, Taiwan

Top

Re: VideoView for full screen and non-full screen

Postby garywang » Thu Dec 31, 2009 8:36 am

garywang wrote:Dear all,

For Android application, I know creating a new media player is big effort.

I create a application for video player (on-line streaming) in two modes: normal size & full screen. But, for those modes, I always creates new media player instance for new streaming playing (by new VideoView for each operation).

Can I use only one VideoView to switch two display modes by changing its width & height size? How to?

Thanks for your help!

Gary


I think View's layout() will be good place to change video's view size.

Sorry! I'm new comer on Android Media Framework. :)
User avatar
garywang
Junior Developer
Junior Developer
 
Posts: 19
Joined: Tue Sep 09, 2008 8:22 am
Location: Taipei, Taiwan

How to done live Streaming

Postby dhaiwat » Wed Jan 13, 2010 12:23 pm

Hi

I am also new with android can u Plz explain how can i do live streaming if u done with it than can u share with me
i try with the code that given in the sdk APIDemo but get "cannot play this Video" error in emulator as well as in device.

Thanks & Regards
Dhaiwat Bhavsar

You can also contact me at my mail dhaiwat.bhavsar@yahoo.com
dhaiwat
Developer
Developer
 
Posts: 28
Joined: Tue Feb 10, 2009 6:49 am

Postby yuvalkesten » Thu Jan 14, 2010 8:27 am

Hi,
From my experience (And I have worked a lot with streaming videos in Android 1.5 so far...) the only way to encode a video which will be good for android streaming is using QuickTimePRO and use the "export for 3g" option.
This is how I am doing it and I am hosting my files on Amazon S3 and it's working great - You can see for yourself in my app MiKiZaZa (check my signature...).
After you encode and upload make sure that the video is visible from your web browser (Maybe you forgot permissions or something) and only then test it on your android app.

BTW - Streaming nice quality videos in the emulator doesn't work properly but on most devices it does...
Try MiKiZaZa... An interactive content player and editor. Transform youtube movies or your family movies to an android game with just a couple of clicks...
Search for MiKiZaZa @ market or go to http://mikizaza.wordpress.com
yuvalkesten
Junior Developer
Junior Developer
 
Posts: 12
Joined: Mon Jun 29, 2009 8:44 pm
Location: Tel Aviv

Unable to set full screen on VideoView

Postby infotomrk » Mon Jan 25, 2010 11:45 am

Unable to set full screen on VideoView


res/layout/myvideo.xml
=================
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.         android:id="@+id/LinearLayout_VideoCall" android:layout_width="fill_parent"
  4.         android:layout_height="fill_parent" android:orientation="vertical"
  5.         android:background="#fff" android:fitsSystemWindows="true"
  6.         android:gravity="fill">
  7.  
  8.         <VideoView android:id="@+id/vcVvIncomingVideoDisplay"
  9.                 android:layout_height="fill_parent" android:layout_width="fill_parent"
  10.                 android:fitsSystemWindows="true"></VideoView>
  11. </LinearLayout>
  12.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4



src/myvideo.java
============
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. android.widget.LinearLayout.LayoutParams vvLayoutParams = (android.widget.LinearLayout.LayoutParams) mVvIncomingVideoDisplay.getLayoutParams();
  2.                         vvLayoutParams.height = LayoutParams.FILL_PARENT;
  3.                         vvLayoutParams.width= LayoutParams.FILL_PARENT;                        
  4.                         mVvIncomingVideoDisplay.setLayoutParams(vvLayoutParams);
  5.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


but no use...
G1 - 50% in full screen (and 90% in landscape)
HTC Hero - 100% screen both side but video is less then 80% in full screen.

Note : ImageView too. Unable to set full screen. Leave ImageView, I need VideoView display as full screen(like player). I have already removed window title bar, and mobile notification bar to use 100% full screen.


any idea....

Thk n Advance...
MRK Think BIG
infotomrk
Freshman
Freshman
 
Posts: 3
Joined: Fri Sep 12, 2008 3:59 pm
Location: India

Re: VideoView for full screen and non-full screen

Postby mapiko » Fri Oct 22, 2010 11:15 am

Try to play it in langscape mode
mapiko
Senior Developer
Senior Developer
 
Posts: 106
Joined: Sat May 15, 2010 5:19 pm

Top

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests