brave / browser-laptop

[DEPRECATED] Please see https://github.com/brave/brave-browser for the current version of Brave
https://www.brave.com
Other
7.95k stars 974 forks source link

Added Widevine support for Amazon Prime Video #5233

Closed alexwykoff closed 7 years ago

alexwykoff commented 8 years ago

Did you search for similar issues before submitting this one? Yes

Describe the issue you encountered: Brave is not detecting the need for Widevine on Amazon Prime Video.

Expected behavior: Brave should detect when Widevine is needed and prompt appropriately like we do for Flash.

bbondy commented 7 years ago

Test Plan: The heuristic is not super good for determining if widevine prompt should come up so we really need to make sure it doesn't come up on other amazon pages, but does come up on Amazon prime video related pages. I suggest testing this with disabled widevine so you get the dialog and know when the heuristic is hit Other heuristics I tried that didn't work was URLs /dp/ (some other products have this), and s=instant_video (some videos don't have this)

bbondy commented 7 years ago

I reverted this because it needs a better metric. I'm moving git to 0.12.9 instead, possibly it'll be moved later even.

bbondy commented 7 years ago

Problems with the current one: It was working for me on amazon prime videos Alex wasn't getting URLs on amazon prime videos in the same format Ayumi was seeing the prompt on aws pages.

I also tried various other heuristics before, so I think we need to find something in the page instead of using the URL as the heuristic.

srirambv commented 7 years ago

+3 from support https://linkbubble.zendesk.com/agent/tickets/7237 https://linkbubble.zendesk.com/agent/tickets/7145 https://linkbubble.zendesk.com/agent/tickets/7095

BrendanEich commented 7 years ago

This issue needs attention in 1.0 timeframe.

alexwykoff commented 7 years ago

Adding a few DOM elements which we might be able to look for:

<span class="a-declarative" data-action="dv-record-reftag" data-dv-record-reftag="{&quot;reftag&quot;:&quot;atv_dp_stream_prime_movie&quot;}">
    <a href="/dp/B01M2YXBZV/?autoplay=1" onclick="if (!window.wbClicked &amp;&amp; window.ue){window.wbClicked=true;uet('bb','watch-clicked',{wb:1});P.when('dv-player-integration-layer').execute(function(i){i.logClientSideMetrics('watch-clicked');});}" class="dv-play-btn-content" data-asin="B01M2YXBZV" data-clickstream-ref="atv_dp_stream_prime_movie" data-fallback-url="" data-is-avod="" data-page-asin="B01M2YXBZV" data-resume-time="0" data-session-id="165-2615247-5598458" data-sign-in-url="" data-token="">
            <span class="dv-icon dv-icon-watch"></span>
            Watch Now
    </a>
    </span>

<html class="a-ws a-js a-audio a-video a-canvas a-svg a-drag-drop a-geolocation a-history a-webworker a-autofocus a-input-placeholder a-textarea-placeholder a-local-storage a-gradients a-hires a-transform3d a-touch-scrolling a-text-shadow a-text-stroke a-box-shadow a-border-radius a-border-image a-opacity a-transform a-transition" data-19ax5a9jf="dingo" data-aui-build-date="3.16.1.5-2016-10-26" style="overflow: hidden;"><!--<![endif]--><head><script async="" src="https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/ClientSideMetricsAUIJavascript-c8621177540f3abe0e5f4606c5f35dad04257105._V2_.js"></script>

var ue_url='/**gp/product**/B06W9P3V2Z/ref=dv_web_wtls_list_ovl_wn_wnzw/uedata/unsticky/165-2615247-5598458/Video/ntpoffrw',

<script type="application/ld+json"> {"productionCompany":{"name":"Amazon Studios","@type":"Organization"},"video":{... </script>

<link rel="stylesheet" type="text/css" href="https://avodassets-a.akamaihd.net/playback/web_player/ATVWebPlayer/1.0.743.13/css/ATVWebPlayer.css">

<script src="https://www.amazon.com/gp/video/streaming/player-token.json?callback=onWebToken_b622bc0a4b4f4fda84aee59159e8b2ed"></script><script crossorigin="anonymous" src="blob:https://www.amazon.com/f61e9a72-cf73-4ece-972d-f86ff66b696d"> <link rel="stylesheet" type="text/css" href="https://avodassets-a.akamaihd.net/playback/web_player/ATVWebCascadesPlayer/1.2.892.0/css/ATVWebCascadesPlayer.css"> <link rel="stylesheet" href="https://images-na.ssl-images-amazon.com/images/G/01/AUIClients/DigitalVideoCarouselAUI-a923621c1c6f8f9147e6cc1ad6c015ff9d779e4a._V2_.css#AUIClients/DigitalVideoCarouselAUI.us.secure.min">

<div id="dv-player-content" class="dv-player-content tv" data-auto-play="

<div id="dv-web-player" data-config="