Giter Site home page Giter Site logo

react-native-google-cast's Introduction

react-native-google-cast's People

Contributors

petrbela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-google-cast's Issues

Can't build on iOS

i can't get this project running in my iOS project, i am clueless.
First the project couldn't find GoogleCast.h, so i installed #2, but now i am stuck with the following errors:
image

i am actually clueless on how to fix this. react-native version is 0.57.8.
Any help would be really appreciated.

Not Work React Native 0.57.1

does not work with the newest version of react native 0.57.1

Of the error when trying to compile

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives

undefined is not an object (evaluating 'GoogleCast.play')

Running into issues using either an Android emulator (With Google Play Service) or physical Android device (Android 8.0)

It builds successfully but I run into this error:
screen shot 2018-11-13 at 9 41 03 am

I updated AndroidManifest.xml and MainActivity.java as stated in the README.

Crash when pressing cast button on android

Hi, I am using this version as i want to add custom receiver for my cast app.

done everything that you guys put in the readme. but when click on the cast button my app crashes. here is the log
07-18 18:03:36.152 23581-23581/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.com.tonton.mobile.alpha, PID: 23581
java.lang.IllegalStateException: The activity must be a subclass of FragmentActivity
at android.support.v7.app.MediaRouteButton.showDialog(MediaRouteButton.java:242)
at android.support.v7.app.MediaRouteButton.performClick(MediaRouteButton.java:303)
at android.view.View$PerformClick.run(View.java:22433)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6236)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
07-18 18:09:01.570 24809-24809/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.com.tonton.mobile.alpha, PID: 24809
java.lang.IllegalStateException: The activity must be a subclass of FragmentActivity
at android.support.v7.app.MediaRouteButton.showDialog(MediaRouteButton.java:242)
at android.support.v7.app.MediaRouteButton.performClick(MediaRouteButton.java:303)
at android.view.View$PerformClick.run(View.java:22433)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6236)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107)
got any idea why this happens?

How to use react-native-navigation with react-native-google-cast?

It looks like you specific mention this here:

If you already extend other class than ReactActivity (e.g. if you use react-native-navigation) or integrate React Native in native app, make sure that the Activity is a descendant of android.support.v7.app.AppCompatActivity. Then add CastContext.getSharedInstance(this); to your Activity's onCreate method (this lazy loads the Google Cast context).

If MainActivity extends NavigationActivity and I add CastContext.getSharedInstance(this); to the onCreate method, then I get build errors. Am I missing something else?

build errors (I assume this is due to not extending GoogleCastActivity. Does that mean I must extend GoogleCastActivity?):

    @Override
    ^
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.```

Native Component for "RNGoogleCastButton" does not exist

On Android, I've imported the library, without problem.
import GoogleCast, { CastButton } from 'react-native-google-cast';

GoogleCast object works but when I add component in render section, I got this error; "Native Component for RNGoogleCastButton does not exist"

"react": "16.4.1",
"react-native": "0.55.4",

CastButton is hard to press on Android.

The cast button is hard to trigger on android. I have to really get the touch right in the middle, and sometimes I find myself having to press it a bunch of times. Maybe increasing the hitSlop could improve this?

Is there way to get player progress update?

I try to find the way to get Chromecast player progress update.

on iOS, I notice that when I'm using GoogleCast.EventEmitter.addListener(GoogleCast.MEDIA_STATUS_UPDATED, this.callback);
and opening the expanded media controller. After pause/play or scrub progress bar the MEDIA_STATUS_UPDATED callback will be triggered every 10 seconds automatically. Bug or not but it's good.
However i don't know how to trigger it automatically when first casting video on TV.

on Android, I can't get the same behaviour as on iOS. I look into google cast reference and find a method from interface RemoteMediaClient.ProgressListener
public void onProgressUpdated(long progressMs, long durationMs)
but I can't find a similar method like that on iOS.

I don't know if there is an easier way to get player progress update. Currently in my app, I'm using Javascript setInterval, but it's like a hacky way that doesn't work very well.

GoogleCastPackage.java:29: error: method does not override or implement a method from a supertype

After following the instructions for only Android. I get this when building. Confirmed that build works before changes. I've reverted the install and tried again from fresh. Get stuck on this every time.

:react-native-google-cast:javaPreCompileDebug UP-TO-DATE /node_modules/react-native-google-cast/android/src/main/java/com/googlecast/GoogleCastPackage.java:29: error: method does not override or implement a method from a supertype @Override ^ 1 error :react-native-google-cast:compileDebugJavaWithJavac FAILED

"Unhandled promise rejection: No cast session"

If I start casting something, leave the app, come back, and try to play something else, the Cast Button seems to know that the device is still connected, but it seems that it doesn't know about the active cast session, so calling castMedia() fails.

If the status is still "Connected", then the library should re-establish the Cast session.

framework not found GoogleCast

Hi! I have next error in Xcode while building project
ld: framework not found GoogleCast
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Podfile
target 'XXXX' do
. pod 'google-cast-sdk', '~> 3'
. pod 'FBSDKShareKit'
. pod 'FBSDKLoginKit'
. pod 'FBSDKCoreKit'
end

(Suggestion) RN with RN Navigation Android sometimes wont start Google Cast in the beginning

This is more a suggestion to some future problem with this lib.
If your app dont recognize the Chromecast in the beginning, and need to open Google Home or Another app to show the Chromecast Button, i put this on MainApplication and then start to work propertly:

import com.google.android.gms.cast.framework.CastContext;
...
@Override
  public void onCreate() {
    super.onCreate();
    CastContext.getSharedInstance(this);
}
...

Gracefully Handle missing or not up-to-date Google Play Services Version

As mentioned in TODO in the ReadMe, gracefully handing missing or not up-to-date version of Google Play Services desirable. Testing on devices where this is the case, exceptions are thrown when calling CastContext.getSharedInstance.

A rough solution approach might be to not show the cast button in cases where Google Play Services is not up-to-date or available, so something like this: https://github.com/joshyhargreaves/react-native-google-cast/pull/1/files. It might be necessary to handle cases where calls to the native Google Cast module, guard against these exceptions also also.

Any other ideas?

Does not detect chromecast, button does not appear

Some cell phones can not find the chromecast, so the submit button does not appear, do you have any idea what it can be and how to solve it? As many users of chromecast 1 as of chromecast 2 reported that.

Sorry for my English

Chromecast 1

Doesn't work on Chromecast 1?

Here the button does not appear

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.