lochstar / nativescript-cast

NativeScript Chromecast Plugin.
Apache License 2.0
16 stars 4 forks source link

Fix onMediaStatusUpdate on Android when queueData is null #41

Open sebj54 opened 2 years ago

sebj54 commented 2 years ago

In my case, queueData is always null so it crashes the app every time onMediaStatusUpdate is called. I added this little check to avoid the crash.

I was not able to use the publish/pack.sh script. It fails every time because it does not find the build.angular npm script. I think there is something wrong with the cd .. line before the angular build part. I tried to remove it but it fails anyway after that.

Error: The Angular Compiler requires TypeScript >=3.9.2 and <4.1.0 but 4.1.3 was found instead.

Maybe TypeScript version should be pinned in package.json and npm ci should be used instead of npm i in pack.sh script?

Let me know if I can do something on my side to help you publish a new version!

lochstar commented 2 years ago

Thanks, I did notice this same crash when migrating the project to the plugin-seed: https://github.com/lochstar/nativescript-cast/blob/plugin-seed/src/cast.android.ts#L834

I need to take another look at that branch and finish off what I started.

sebj54 commented 2 years ago

Great! Let me know if I can help in any way