Giter Club home page Giter Club logo

android-exoplayer-airplay-receiver's People

Contributors

warren-bank avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar

android-exoplayer-airplay-receiver's Issues

[HELP] Cannot be seen from my iphone

Hi, I managed to install the app onto my phone, but I couldn't find the receiver on any of my devices. But it works using this.

Did I do something wrong? It is AirPlay, right?

App does not work under Android 11 API-Level 30 (FireOS 8), problem with MANAGE_OVERLAY_PERMISSION

Hi,
there is a problem with the MANAGE_OVERLAY_PERMISSION under Android 11, Service cannot register...

ADB Logcat:
--------- beginning of crash 04-08 12:19:42.506 5319 5319 E AndroidRuntime: FATAL EXCEPTION: main 04-08 12:19:42.506 5319 5319 E AndroidRuntime: Process: com.github.warren_bank.exoplayer_airplay_receiver, PID: 5319 04-08 12:19:42.506 5319 5319 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.github.warren_bank.exoplayer_airplay_receiver/com.github.warren_bank.exoplayer_airplay_receiver.ui.StartNetworkingServiceActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.action.MANAGE_OVERLAY_PERMISSION dat=package:com.github.warren_bank.exoplayer_airplay_receiver } 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3468) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3626) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2081) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7719) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.action.MANAGE_OVERLAY_PERMISSION dat=package:com.github.warren_bank.exoplayer_airplay_receiver } 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2067) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1727) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:5337) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:5295) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.github.warren_bank.exoplayer_airplay_receiver.utils.RuntimePermissionUtils.showDrawOverlayPermissions(SourceFile:32) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.github.warren_bank.exoplayer_airplay_receiver.utils.RuntimePermissionUtils.showDrawOverlayPermissions(Unknown Source:1) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.github.warren_bank.exoplayer_airplay_receiver.ui.StartNetworkingServiceActivity.requestPermissions(Unknown Source:25) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at com.github.warren_bank.exoplayer_airplay_receiver.ui.StartNetworkingServiceActivity.onCreate(Unknown Source:3) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:8019) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:8002) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3441) 04-08 12:19:42.506 5319 5319 E AndroidRuntime: ... 11 more 04-08 12:20:55.637 9020 9063 E AndroidRuntime: FATAL EXCEPTION: Thread-3

[Android 4.1.x - 4.4.x] some video URLs don't load

reproducible using:

  • Android 4.4.2 (armv7)
  • any video on tubi.tv
    • interestingly, a video will successfully play every once in a very large number of attempts

logcat:

  • reveals that the video URL cannot be downloaded by ExoPlayer (using okhttp) because of a problem with the SSL handshake

related issue(s):

  • ExoPlayer#4383 describes an error that looks nearly identical to my observations
    • TLSv1 is the incompatible protocol used by ExoPlayer on the OP's device
    • SSLv3 is the incompatible protocol used by ExoPlayer on my test device

possible fix:

  • as discussed in the above issue, this answer on StackOverflow sounds like a good place to start..
    • it provides a methodology to enable TLSv1.2 on older devices
      • in 'build.gradle'
          implementation 'com.google.android.gms:play-services-auth:16.0.1'
      • in 'onCreate()' lifecycle method of 'MainApp.java'
          import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
          import com.google.android.gms.common.GooglePlayServicesRepairableException;
          import com.google.android.gms.security.ProviderInstaller;
          import java.security.KeyManagementException;
          import java.security.NoSuchAlgorithmException;
          import javax.net.ssl.SSLContext;
        
          try {
            ProviderInstaller.installIfNeeded(getApplicationContext());
            SSLContext sslContext;
            sslContext = SSLContext.getInstance("TLSv1.2");
            sslContext.init(null, null, null);
            sslContext.createSSLEngine();
          }
          catch (
            GooglePlayServicesNotAvailableException |
            GooglePlayServicesRepairableException   |
            KeyManagementException                  |
            NoSuchAlgorithmException e
          ) {
            e.printStackTrace();
          }

related article(s):

related gist(s):

possible fix:

  • as discussed in the above article, this answer on StackOverflow sounds like a more generic solution that doesn't depend on a gms library
    • it provides a methodology to enable both TLSv1.1 and TLSv1.2 on older Android 4.1+ devices
      • in 'TLSSocketFactory.java'
          import java.io.IOException;
          import java.net.InetAddress;
          import java.net.Socket;
          import java.net.UnknownHostException;
          import java.security.KeyManagementException;
          import java.security.NoSuchAlgorithmException;
        
          import javax.net.ssl.SSLContext;
          import javax.net.ssl.SSLSocket;
          import javax.net.ssl.SSLSocketFactory;
        
          /**
           * https://blog.dev-area.net/2015/08/13/android-4-1-enable-tls-1-1-and-tls-1-2/
           */
          public class TLSSocketFactory extends SSLSocketFactory {
        
            private SSLSocketFactory internalSSLSocketFactory;
        
            public TLSSocketFactory() throws KeyManagementException, NoSuchAlgorithmException {
              SSLContext context = SSLContext.getInstance("TLS");
              context.init(null, null, null);
              internalSSLSocketFactory = context.getSocketFactory();
            }
        
            @Override
            public String[] getDefaultCipherSuites() {
              return internalSSLSocketFactory.getDefaultCipherSuites();
            }
        
            @Override
            public String[] getSupportedCipherSuites() {
              return internalSSLSocketFactory.getSupportedCipherSuites();
            }
            
            @Override
            public Socket createSocket() throws IOException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket());
            }
        
            @Override
            public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket(s, host, port, autoClose));
            }
        
            @Override
            public Socket createSocket(String host, int port) throws IOException, UnknownHostException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port));
            }
        
            @Override
            public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port, localHost, localPort));
            }
        
            @Override
            public Socket createSocket(InetAddress host, int port) throws IOException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket(host, port));
            }
        
            @Override
            public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
              return enableTLSOnSocket(internalSSLSocketFactory.createSocket(address, port, localAddress, localPort));
            }
        
            private Socket enableTLSOnSocket(Socket socket) {
              if(socket != null && (socket instanceof SSLSocket)) {
                ((SSLSocket)socket).setEnabledProtocols(new String[] {"TLSv1.1", "TLSv1.2"});
              }
              return socket;
            }
          }
      • in 'onCreate()' lifecycle method of 'MainApp.java'
          import android.os.Build;
          import javax.net.ssl.HttpsURLConnection;
        
          if (
            (Build.VERSION.SDK_INT >= 16) &&
            (Build.VERSION.SDK_INT <  20)
          ) {
            try {
              TLSSocketFactory socketFactory = new TLSSocketFactory();
        
              HttpsURLConnection.setDefaultSSLSocketFactory(socketFactory);
            }
            catch(Exception e) {}
          }

Description for end-users missing

Could you please add some description for end-users (ideally including some screenshots) to get an idea of the app's working? It sounds interesting, but without a basic idea potential users are "scared away" as it looks like they need "programming knowledge" to be able to actually cast content to your app. If there were examples on how to use it, that might lower the barrier. Thanks!

SPA hosted by surge.sh is frequently offline

This SPA is described in the README.

background:

  • the web server built into ExoAirPlayer that listens on port 8192 is insecure (HTTP)
  • all current web browsers block mixed content
    • ie: the ability to make requests from secure (HTTPS) pages to insecure (HTTP) endpoints

For these reasons, it's convenient to serve the SPA from an insecure (HTTP) host.
Unfortunately, nearly all hosts currently disable the ability to serve insecure (HTTP) pages.
surge.sh is great when it's working, but…

As a workaround in Chromium-based web browsers:

  1. open: chrome://flags/
  2. search: Insecure origins treated as secure
  3. enter: a comma-separated list of ExoAirPlayer servers
    • ex: http://192.168.0.2:8192,http://192.168.0.3:8192,http://192.168.0.4:8192
  4. click: Relaunch

notes:

  • Chrome will restart
  • every time Chrome is started, a notification banner will be displayed
    to inform you that Chrome was started with an unsafe command-line flag
    • ex: --unsafely-treat-insecure-origin-as-secure=http://192.168.0.2:8192,http://192.168.0.3:8192,http://192.168.0.4:8192
    • this banner can be hidden by clicking an "x" icon

purpose:

  • now, the SPA can be served from any secure (HTTPS) host…
    and mixed content requests can be sent to any of the listed ExoAirPlayer servers

Cannot connect to device.

The app is running and the TV appears in the list of devices, but when I try to connect, it just doesn't, everything I get is a loading icon and a cannot connect to device error. Do I need to make the TV have a static ip or something? I only installed the app.

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.