Closed Bug 1065193 Opened 6 years ago Closed 6 years ago

not getting prompt to allow QT on an Apple page

Categories

(Web Compatibility :: Desktop, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: jbecerra, Unassigned)

References

()

Details

(Whiteboard: [country-us] [video])

On the latest nightly(35), when I try to watch the video in the following page: http://www.apple.com/iphone-6/films/#video-product I don't get the prompt to allow QuickTime to load. I do get the prompt when I try to load any of the videos in the page: http://trailers.apple.com/trailers/

On beta, the first page does prompt me to load the plugin.
Hmm testing 

http://trailers.apple.com/trailers/independent/nonoadockumentary/
http://www.apple.com/iphone-6/films/#video-product

with:

* Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0
  I get the prompt for both URIs
* Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0
  I get the prompt only for http://trailers.apple.com/trailers/independent/nonoadockumentary/

So indeed there is a difference, but it's not on what the server sends

→ http -b GET 'http://www.apple.com/iphone-6/films/#video-product' 'User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0' >32.txt
→ http -b GET 'http://www.apple.com/iphone-6/films/#video-product' 'User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:35.0) Gecko/20100101 Firefox/35.0' >35.txt 

-rw-r--r--  17621 10 sep 12:15 32.txt
-rw-r--r--  17621 10 sep 12:15 35.txt

→ git diff --color-words 32.txt 35.txt 
<NONE>

Inspecting the DOM, we get a different thing, because there are indeed in two different state of initialization. 

On Firefox 35, near the bottom of the page, we get:

<video style="opacity: 0.1; width: 4px; height: 4px; position: absolute; bottom: 0px; right: 0px;" id="ac-video-html5-test-movie"><source src="//images.apple.com/media/ac/ac-video/0.1.0/test_playback.m3u8" type="application/vnd.apple.mpegURL"></video>

On Firefox 32, near the bottomg of the page, we get:

<video style="opacity: 0.1; width: 4px; height: 4px; position: absolute; bottom: 0px; right: 0px;" id="ac-video-html5-test-movie"><source src="//images.apple.com/media/ac/ac-video/0.1.0/test_playback.m3u8" type="application/vnd.apple.mpegURL"></video>
<video style="opacity: 0.1; width: 4px; height: 4px; position: absolute; bottom: 0px; right: 0px;" id="ac-video-html5-test-movie"><source src="//images.apple.com/media/ac/ac-video/0.1.0/test_playback_cellular.m4v" type="video/mp4; codecs=avc1.42E01E,mp4a.40.2"><track src="//images.apple.com/media/ac/ac-video/0.1.0/test_playback-captions.vtt" default="" label="English WebVTT" srclang="en" kind="captions"></video>
<embed src="//images.apple.com/media/ac/ac-video/0.1.0/test_playback_cellular.m4v" style="width:8px; height:8px;" class="ac-video-media" id="ac-video-qt-test-movie" wmode="transparent" name="ac-video-qt-test-movie" type="video/quicktime" scale="tofit" enablejavascript="true" postdomevents="true" controller="false" poster="" bgcolor="" pluginspage="www.apple.com/quicktime/download" width="8" height="8">



I have the feeling that is normal, (if I'm not wrong)
Firefox 32 has NO support for H264 (so it needs Quicktime)
Firefox 35 has    support for H264

Now that said, I can't start the video in Firefox 35 :)

Adding Hallvord here
Flags: needinfo?(hsteen)
Whiteboard: [country-us] [video]
http://trailers.apple.com/trailers/global/v3.1/scripts/lib/ac_media.js contains relevant stuff:

// = Apple Gracefully Degrading Media Playback =
//
// This script provides functionality for both creating video players
// that will use modern technology if possible, but fall back on QuickTime.

Further down in the file we find stuff like this:


        switch (true) {

            case (ipad || (shouldBuildMediaSpecVideo && Media._isHTML5VideoAvailable() && !Media.Detection.Firefox() && !Media.Detection.Mobile() && !Media.Detection.Chrome() && !Media.Detection.Opera()) && !(ACUtils.Detector.getAgent().match(/msie 9/i)) || (iPhoneOSVersion && iPhoneOSVersion[0] >= 3)):
                // Create <video> player

                if (options.audio == true && typeof Media.Spec.Audio !== undefined) {
                    return build(Media.Spec.Audio);
                }
                return build(Media.Spec.Video);
                break;
            case (shouldBuildMediaSpecQuickTime && Media._isQuickTimeAvailable(Media.MIN_QUICKTIME_VERSION)):
            case (iPhoneOSVersion && iPhoneOSVersion[0] < 3):
                // Create QuickTime player

                return build(Media.Spec.QuickTime);
                break;
            case (shouldBuildMediaSpecSBVDP && Media._isSBVDPAvailable(Media.MIN_SBVDP_VERSION)):
                // Create SBVDP player
                return build(Media.Spec.SBVDP);
                break;
            case Media._shouldShowDownloadPrompt():
            default:
                // At this point we've determined there will be no video,
                // so show a download prompt if we need to, then return false;
                MediaLanguage.getTranslations(this);
                // Media.createDownloadPrompt(container, src, options);
                break;
        }

But I'd expect this code to "fall back" to QuickTime because of the "!Media.Detection.Firefox()" part.

BTW HTML5 <video> support detection is done with this:

    HTML5: function() {
        if (!('HTMLMediaElement' in window)) {
            return false;
        }

        var video = document.createElement('video');
        return (video.canPlayType && video.canPlayType('video/mp4') !== '');
    }

and creating <video> linking to M3U8 playlists based on that detection would be .. wrong ;) If that's what they do.
Flags: needinfo?(hsteen)
I installed current 35.0a Nightly but I can't reproduce the problem. It does create an <object> for QuickTime as long as "Firefox" is found in the UA string. Maybe that !Firefox code was added very recently as a workaround to this problem?

Juan, still an issue for you? What is your UA string, and can you check you don't have a UA override for apple.com?
Flags: needinfo?(jbecerra)
This is no longer a problem for me on the latest nightly Fx35.0a1. I wasn't using a user agent override at the time.
Flags: needinfo?(jbecerra)
Hm.. wonder if that "not Firefox" sniffing will hurt us at some point.. :-p Anyway, short-term it's fixed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Web Compatibility
You need to log in before you can comment on or make changes to this bug.