diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2926fc4d..68df7197 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,3 +32,10 @@ jobs: - run: npm ci - run: npm run build - run: npm run package + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: youtube_adfree_ipk + path: | + ${{github.workspace}}/youtube.leanback.v4_*_all.ipk diff --git a/CHANGELOG.md b/CHANGELOG.md index 955dcb69..f786bf24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # ChangeLog +## Unreleased +* Fixed deeplinking from voice search results +* Fixed in-app voice search button on webOS 5.x +* Fixed screensaver kicking in on sponsor segment skips + ## Version 0.0.1 * Created basic web app which launches YouTube TV. diff --git a/assets/appinfo.json b/assets/appinfo.json index b3b72fa3..92b235df 100644 --- a/assets/appinfo.json +++ b/assets/appinfo.json @@ -16,9 +16,16 @@ "userAgent": "$browserName$/$browserVersion$ ($platformName$-$platformVersion$), _TV_$chipSetName$/$firmwareVersion$ (LG, $modelName$, $networkMode$)", "allowCrossDomain": true }, + "deeplinkingParams": "{\"contentTarget\":\"v=$CONTENTID\"}", + "inAppSearchParams": "{\"contentTarget\":\"q=$SEARCH_KEYWORD\"}", + "inAppVoiceIntent": "{\"contentTarget\":{\"intent\":\"$INTENT\",\"intentParam\":\"$INTENT_PARAM\",\"languageCode\":\"$LANG_CODE\"}}", + "supportQueryRouting": "{\"amazonAlexa\":true,\"googleAssistant\":true}", + "resolution": "1920x1080", + "enablePigScreenSaver": false, "trustLevel": "netcast", "privilegedJail": true, "supportQuickStart": true, "dialAppName": "YouTube", - "disableBackHistoryAPI": true + "disableBackHistoryAPI": true, + "supportGIP": true } diff --git a/src/utils.js b/src/utils.js index c8f0875f..f407dfb3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -7,18 +7,25 @@ export function extractLaunchParams() { } export function handleLaunch(params) { - const { contentTarget } = params; + // We use our custom "target" param, since launches with "contentTarget" + // parameter do not respect "handlesRelaunch" appinfo option. We still + // fallback to "contentTarget" if our custom param is not specified. + // + let { target, contentTarget = target } = params; + if (contentTarget && typeof contentTarget === 'string') { + if (contentTarget.indexOf('v=v=') != -1) contentTarget = contentTarget.replace('v=v=', 'v='); + if (contentTarget.indexOf('https://www.youtube.com/tv?') === 0) { console.info('Launching from direct contentTarget:', contentTarget); window.location = contentTarget; } else { console.info('Launching from partial contentTarget:', contentTarget); - window.location = 'https://www.youtube.com/tv#?' + contentTarget; + window.location = 'https://www.youtube.com/tv#/?' + contentTarget; } } else { console.info('Default launch'); - window.location = 'https://www.youtube.com/tv'; + window.location = 'https://www.youtube.com/tv#/'; } }