• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

j2me: play video on mobile

 
ahmed barqawi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i try to play video from mobile "offline" it is give me out of memory exception, when i install it on mobile it does not work.

and when i try to stream it from the internet it is work on emulator, in mobile it does not give any result.

what is the solution, if there is working example, project or any useful feedback.
 
Walter Gabrielsen Iii
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be the case that your phone just doesn't have the memory to store a whole video clip.

It may also be the case that the phone doesn't support JSR 135: Mobile Media API -- it's an optional package that may not be included in all cell phones.

Java ME MIDP 2.0 is deceiving in that javax.microedition.media.* looks exactly like JSR 135, but, without JSR 135, MIDP 2 just supports a smaller subset of the Mobile Media API that only provides audio playback, no video -- Mobile Media API Overview.

Media in MIDP 2.0

The MIDP 2.0 specification includes a subset of the Mobile Media API. It is upwardly compatible with the full API. The MIDP 2.0 subset has the following characteristics:

  • Only audio playback (and possibly recording) is supported. No video-specific control interfaces are included.
  • Multiple players cannot be synchronized.
  • The DataSource class and the rest of the javax.microedition.media.protocol package are excluded; applications cannot provide their own protocol implementations.
  • The Manager class is simplified.

  • MIDP 2.0 requires support for tone generation and sampled .wav audio playback.


    When you create a project in Java ME SDK it will, by default, enable all the optional packages. Go to your "Projects" pane, right-click your project, and choose "properties" to see which ones are "on."

    On the Category: "Platform" screen, under "Optional packages," all the checked packages will appear to function on the emulator but won't work on a cell phone if it doesn't include those packages, Optional being the keyword.
     
    ahmed barqawi
    Greenhorn
    Posts: 8
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    i edit the code and vodeo is running now .... i do not now what was the problem.

    now when i play video it is play is very small size.

    when i set video Controller full screen to true .. the audio just working and video not displayed.

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic