Closed liginPunoose closed 11 months ago
Playback is happening for youtube, once the parameters are decoded
sam2@sam2-VirtualBox:~/RUST/dab-compliance-suite$ python3 main.py -v -b 127.0.0.1 -I 02AD320123DA -c ApplicationsLaunchWithParameters
testing applications/launch {"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]} ... App started?(Y/N)
[y]
applications/launch Latency, Expected: 10000 ms, Actual: 865 ms
[ PASS ]
{
"status": 200
}
OK: applications/launch
ENCODED URL: Some(["v%3DSs75O8yllyc", "enableEventConsole%3Dtrue", "env_showConsole%3Dtrue"])
decoded url is ["v=Ss75O8yllyc", "enableEventConsole=true", "env_showConsole=true"]
RDK Common Port Team's response: Tried giving the DAB url request to YouTube as "plain text" and please find the results (with this PR changes).
testing applications/launch
{"appId": "YouTube", "parameters": ["v%3DSs75O8yllyc","enableEventConsole%3Dtrue","env_showConsole%3Dtrue"]}
By passing the arguments in the following way to Youtube, could see that content is being played and Youtube accepts the same.
Cold Launch:
curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0", "id": 1234567890, "method": "org.rdk.RDKShell.1.launch" ,"params": {"callsign": "Cobalt","type":"Cobalt","visible":true,"configuration": {"url":"https://www.youtube.com/tv?v=Ss75O8yllyc&enableEventConsole=true&env_showConso
le=true"}}}' http://127.0.0.1:9998/jsonrpc
Hot Launch/Deeplink
curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0","id":3, "method": "Cobalt.1.deeplink", "params":"https://www.youtube.com/tv?v=jfKfPfyJRdk&enableEventConsole=true&env_showConsole=true"}' http://127.0.0.1:9998/jsonrpc
This would need recipe update.
What
Adding fix to decode encoded parameters for youtube
Why
As per dab-specification encoded url is given as parameter to youtube, but youtube accepts parameters in decoded string format
How
using urlencoding crate decoded the incoming parameter list for youtube before appening the parameter list