Open pixshatterer opened 5 years ago
Not currently, no. Would another launch.json setting work for you? The new setting could be called "deepLinkUrl". Something like this:
{
"version": "0.2.0",
"configurations": [
{
"type": "brightscript",
"request": "launch",
"name": "BrightScript Debug: Launch",
"host": "192.168.1.17",
"deepLinkUrl": "http://192.168.1.17:8060/install/<channel_id>?contentID=<contentID>&mediaType=series",
"password": "password",
"rootDir": "${workspaceFolder}",
"consoleOutput": "full",
"stopOnEntry": false
}
]
}
that would be awesome! also, an unrelated question - the plugin is able to use a rokudeploy.json
file while deploying? since it uses roku-deploy
module, I wondered if that was the case.
Yes, you should technically be able to use a rokudeploy.json file. I believe the files
property doesn't work in rokudeploy.json when using this extension, and there may be a few others that get overridden by this extension.
However, an undocumented alternative to rokudeploy.json is that you can actually specify rokudeploy.json settings directly in your launch configuration. I pass the entire launch configuration object to rokudeploy, and it uses the options it knows about.
I just wanted to give you an update. I started working on the "launch directly to deep link" concept a while back, and made some progress. Life just got busy. It's possible, and I'll try to get to it sometime soon...but just wanted to give an update saying that work has at least been started.
@pixshatterer I just pushed this branch with my first attempt at supporting deep linking. Can you pull down the code and try it out and let me know how it goes?
@TwitchBronBron sure! how would be the usage? it is still the "deepLinkUrl"
property the one to use?
Yep, that's the one! Use "deepLinkUrl". You can use the ${host} placeholder in that url if you don't want to duplicate the hostname, but I would test it out with a full url at first to make sure it's working.
@pixshatterer Have you had a chance to look at this change yet? I'd love to get it merged into master, but I want to make sure it works for a proper roku app (not just my test apps) before I do.
@pixshatterer @georgejecook @triwav @bvisin I just merged master into this branch, so it should have all of the latest changes now.
Does this work well enough for you all that it can be merged into master / is there anything else that needs done?
The latest version of the branch has removed ${promptForContentId}
and ${promptForMediaType}
in favor of ${promptForQueryParams}
. This should hopefully streamline the process a little bit.
Anything stopping this from being merged into master?
@timalacey I don't do any Roku development right now, so I need some actual Roku developers to test it out and validate it before I merge. If you're interested in trying it out, and don't want to figure out how to build the project locally, let me know and I can get you a vsix
bundle with these changes included for you test out.
Apologies for not getting back to you @TwitchBronBron
It works. I'm not too concerned with the 1.5 seconds lost due to the auto-run and then reacting to the /launch ECP. Your feature also works on older Roku's which Eclipse never did, so thanks.
Apologies for not getting back to you @TwitchBronBron too! totally swamped with non-roku projects right now so I had no chance to check this out - I would say go ahead!
@TwitchBronBron I'm not able to get this to work with a clean vscode installation and without using brighterscript. Here is what I did:
The dev channel is being launched, but the expected relaunch with the deeplink-parameters is not happening. Did I miss something?
Hmm. I'm having trouble getting this to work as well. This must have broken at some point. @chrisdp we might want to take this opportunity to revisit the ECP/Deep Linking logic in general. Perhaps inject the values on the first line of the main function?
I’m a strong proponent of that approach. The current method requires a restart of the application which is kind of clunky and has issues with the debug protocol as well I believe
Do we need to worry about things like URL encoding?
No. The device runs one decode on the way in so we would inject as typed.
{
MediaType: string | string from enum( will get list),
ContentId: string
}
list of media types from Roku documentation:
movie
episode
season
series
shortFormVideo
special
live
@chrisdp besides the actual deeplinking, you can also run the unit-testing-framework via deeplink. Running tests has been mentioned in this issue: https://github.com/rokucommunity/vscode-brightscript-language/issues/53
Actually something like this approach in launch.json would be more useful: "args": [ "mediaType=episode", "contentId=some_bunch_of_ids" ],
This way one could also set something like: "args": [ "my_Debugging_arg=my_Debugging_val" ]
Is there a way to pass arguments to simulate deeplinking while debugging?