update 3.

rotation issue is fixed, since iOS4, video rotation seems to inherit from
its hoster, ie, if the native app disables rotation, then video launched by
this app is not able to rotate too.

my only issue left now, is that <video> tag loaded by iUI is very laggy,
page is significantly fozen for a few seconds in the half way loading. i
tried to set autobuffer=false in video tag property but it didn't seem to
work...

any trick?


On 2010-07-02, Kelvin Wu <[email protected]> wrote:
>
> update 2.
>
> I found another <video> tag behave change.
>
> When a page contains <video> tag, in iOS 3.x.x, iUI loads such page with no
> delay; in iOS 4, page loading lags, and almost freezes for a while, I
> believe in iOS 4, iPhone is trying to initilize video content (retrieve
> video format, duration, first frame etc). Very bad user experience.
>
> I tried to dynamically create <video> tag upon user click, this will make
> page loading very smooth because <video> tag hasn’t been created when
> loading,
>
> HTML/Javascript code look like:
>
> <a href="javascript:playVideo('url');">Video 1, 02:31, 10.2MB</a>
> <div id=videoContainer></div>
>
> <script>
> function playVideo (url) {
>  myVideo = document.createElement('video');
>  myVideo.setAttribute('width','1');
>  myVideo.setAttribute('height','1');
>  myVideo.setAttribute('src',url);
>  myVideo.autoplay = false;
>  myVideo.controls = false;
>  document.getElementById('videoContainer').appendChild(myVideo);
>  myVideo.play();
> }
> </script>
>
> But that will be delay after user taps video link and before player is
> launched. iPhone still needs to initilize content after <video> tag is
> dynamically created, that delay could be very long if network is poor. Any
> way to indicate something "loading video ..." right after click?
>
>
>
>
>
>
>
> On 2010-07-01, Kelvin Wu <[email protected]> wrote:
>>
>> update.
>>
>> it seems to be bug/change of tab bar based app?
>>
>> In iOS4, app with bottom tab bar does not rotate at all (the app itself,
>> the web page inside, the video player). if i removed the bottom tab bar,
>> rotation works as expected.
>>
>>
>>  On 2010-07-01, Kelvin Wu <[email protected]> wrote:
>>>
>>> Thanks, Lee,
>>>
>>> I finally understand where my problem came from but I don't have a
>>> solution for it...
>>>
>>> My bad I didn't explain clearly, my app is actually a hybrid app, all iUI
>>> related stuff (js/css/images) are wrapped within native WebView, Ajax calls
>>> to retrieve the page that contains <video> tag.
>>>
>>> I just realized that, if I run the app as a Web app from Safari, the
>>> <video> tag has no issue with portrait and landscape rotation; if the
>>> <video> is retrieved by a native app WebViewUI, then it is forced to play in
>>> portrait mode.
>>>
>>> This problem does not exist in previous OS 3.x.x.
>>>
>>>
>>>
>>> On 2010-06-30, QuickConnect <[email protected]> wrote:
>>>>
>>>> Kevin,
>>>>
>>>> I went to http://www.apple.com/html5 and selected the video example to
>>>> test out what would happen on my iOS4 3G iPhone.  It ran normally and
>>>> allowed rotation when playing.  The video tag in the page is as
>>>> follows.
>>>>
>>>> <video id="videoShowcase" width="848" height="352"  src="http://
>>>> movies.apple.com/media/us/html5/showcase/2010/demos/apple-html5-demo-
>>>> tron_legacy-us-20100601_r848-2cie.mov" poster="http://images.apple.com/
>>>> html5/showcase/video/images/tron_legacy.jpg" loop="loop"
>>>> autoplay="autoplay" autobuffer="autobuffer">
>>>>
>>>> <img src="http://images.apple.com/html5/showcase/video/images/
>>>> tron_legacy.jpg" />
>>>>                                                                </video>
>>>>
>>>> This is a normal video tag not using embed.
>>>>
>>>> I'm not seeing the same issue.  Could it be that there is some
>>>> difference between this video tag and yours?
>>>>
>>>>
>>>> Lee
>>>>
>>>> On Jun 29, 11:06 am, Kelvin Wu <[email protected]> wrote:
>>>> > Hi there,
>>>> >
>>>> > Does anybody notice the behave change on <video> tag in new iOS 4? ie,
>>>> video
>>>> > is forced to play in portrait mode, and can NOT rotate to landscape
>>>> mode.
>>>> >
>>>> > <video id="video" name="video" src="url_to_media_file" height="300"
>>>> > width="140" scale="1" poster="url_to_poster_file"/>
>>>> >
>>>> > <a href="javascript:var
>>>> myVideo=document.getElementsByTagName('video')[0];
>>>> > myVideo.play();">Play Video (duration: 02:31, size: 10.18mb)</a>
>>>> >
>>>> > Portrait/landscape rotation is fine if using <embed> tag instead of
>>>> <video>
>>>> > tag. However I choose to use <video> tag because of this reported
>>>> issue:http://code.google.com/p/iui/issues/detail?id=193
>>>> >
>>>> > I also want to use javascript to play video because I need put some
>>>> text
>>>> > description, I am not sure if <embed> tag supports such usage or not:
>>>> > video.play();
>>>> >
>>>> > The phone is iPhone 3G.
>>>> > Is it a bug? or a feature of iOS 4?
>>>> >
>>>> > --
>>>> >
>>>> > Sent from my mobile. Ignore the typos unless they're funny.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "iPhoneWebDev" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<iphonewebdev%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/iphonewebdev?hl=en.
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> Sent from my mobile device. Ignore the typos unless they're funny.
>>
>>
>>
>>
>> --
>>
>> Sent from my mobile device. Ignore the typos unless they're funny.
>>
>
>
>
> --
>
> Sent from my mobile device. Ignore the typos unless they're funny.
>



-- 

Sent from my mobile device. Ignore the typos unless they're funny.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to