Code Monkey home page Code Monkey logo

react-native-jw-media-player's People

Contributors

archcorsair avatar arsimr16 avatar chaimpaneth avatar cmcaboy avatar crwhite21 avatar ddolheguy avatar devinedecrypter avatar enisit avatar escobar022 avatar imobiledevz avatar jasonlipo avatar jhpark723 avatar jmilham21 avatar joshbuchea avatar kestasvenslauskas avatar kononenkoanton avatar microadam avatar nateshmbhat avatar nulleof avatar pierrecapo avatar pliashkou avatar rymate1234 avatar sinkovskyv avatar sufianbabri avatar yogiyadavmca 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

react-native-jw-media-player's Issues

Android demo not working

Hi.
When I run the example on the Android, I get the following error:

 Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> failed to find Build Tools revision 23.0.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.648 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

(node:25034) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'message' of undefined
    at handleError (/home/ppc/React/Native/react-native-jw-media-player/Example/node_modules/react-native/local-cli/cliEntry.js:35:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
(node:25034) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:25034) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

He also complains about sdk.dir=/path/to/AndroidSDK. the latter is solved by adding a file local.properties:

sdk.dir=/path/to/AndroidSDK

Closed Captions Support

Hi there, I couldn't find any documentation about closed captioning support.
Does the mediaId property allow the player to read the captions available?

Any assistance on this topic would be appreciated, thank you.

AdSchedule Seems Not Work Properly On Android

Hi @chaimPaneth, I am trying to implement VMAP ads on JWPlayer by adding adSchedule on playlistItem. But I always get the result that the ad's video does not play and also there is always a loading indicator run forever while the original video won't play. I need your help. Thank you.

This is an example of my playlist item

const playlistItem = {
    mediaID: "ykJZQsJn",
    time: 0,
    file: "https://cdn.jwplayer.com/manifests/ykJZQsJn.m3u8",
    controls: true,
    repeat: false,
    adSchedule: [
      {
        tag:
          'https://pubads.g.doubleclick.net/gampad/ads?slotname=/124319096/external/ad_rule_samples&sz=640x480&ciu_szs=300x250&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpost&url=https://developers.google.com/interactive-media-ads/docs/sdks/html5/tags&unviewed_position_start=1&output=xml_vast3&impl=s&env=vp&gdfp_req=1&ad_rule=0&vad_type=linear&vpos=preroll&pod=1&ppos=1&lip=true&min_ad_duration=0&max_ad_duration=30000&vrid=6256&video_doc_id=short_onecue&cmsid=496&kfa=0&tfcd=0',
        offset: 'pre',
      },
    ],

That case only happens on Android but fine on iOS. ๐Ÿ™

onSeek & onSeeked iOS callbacks

onSeek & onSeeked event callbacks on iOS is not working. Would love to implement it myself but at this moment my objective c skills are not enough :/

[Android/iOS] adVmap prop - no ads played

Hi @chaimPaneth , it seems that using the adVmap prop as described in the docs does not work neither on iOS nor Android. The vmap url is passed into native code but it seems the player is ignoring it for some reason. It works in the iOS demo app provided by JW Player.

Here's some example code (taken from the example):

<JWPlayer
              style={styles.player}
              playlistItem={{
                mediaId: "1",
                file: "http://content.bitsontherun.com/videos/3XnJSIm4-injeKYZS.mp4",
                autostart: false,
                adVmap: "http://playertest.longtailvideo.com/adtags/vmap2.xml"
              }}
              onBeforePlay={() => this.onBeforePlay()}
              onPlay={() => this.onPlay()}
              onSetupPlayerError={(e) => this.onSetupPlayerError(e)}
              onPlayerError={(e) => this.onPlayerError(e)}
              onBuffer={() => this.onBuffer()}
              onTime={(time) => this.onTime(time)}
              nativeFullScreen={true}
              onFullScreen={() => this.onFullScreen()}
              onFullScreenExit={() => this.onFullScreenExit()}
            />

If you could point me to what the problem might be, it would be much appreciated.
Thank you.

Cannot build in ios

Build input file cannot be found: '../node_modules/react-native-jw-media-player/ios/CustomJWPlaylistItem.m'

Android Breaks with JW Player SDK version 3.16.0

JWPlayer Android SDK 3.16.0 Release Notes:
Updated the Google IMA to support version 3.18.1.

This has caused some sort of incompatibility between google packages. It wasn't able to find androidx.media.session.

Downgrading to 3.15.1 fixed the issue.

Ad support

Please tell me if there is support for video ads? If so, can you show some code examples?

Display image with video extension .m3u8

Hi @chaimPaneth ,
I have a url with extension .m3u8 (no video, it is black screen), and i want display image by 'image' prop in playListItem when my video url black screen. Android done, but iOS not working...
Can you tell me how to do it? :((
Thank you!

Multiple videos cause app crash on iOS

When rendering multiple videos on a single page, the iOS app crashes.

Thread 1: EXC_BAD_ACCESS (code=1, address=0x222dfde48)

RN version: 0.59.4
JWPlayer: 3.7.0
react-native-jw-media-player: 0.1.12

Get error 102630 with source video from youtube

I get youtube link download from youtube
I have checked the path in my browser and it works
Link be like
https://r3---sn-42u-i2i6.googlevideo.com/videoplayback?expire=1581370303&ei=X3dBXsOBA4mR4AL7kqnIBA&ip=150.95.114.172&id=o-AB4f5tYq_JBvnsi6hIUva2jS1sYN6S00h9Lz35NgPf7J&itag=18&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-42u-i2i6%2Csn-42u-nbo6&ms=au%2Crdu&mv=u&mvi=2&pl=21&vprv=1&mime=video%2Fmp4&gir=yes&clen=14781074&ratebypass=yes&dur=315.628&lmt=1580882523007800&mt=1581348373&fvip=3&fexp=23842630&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl&lsig=AHylml4wRAIgEXAiDymwQB4FzEQw2S21Snoa_Rw0kAoyKPtyxdpGTqQCIFAi2g3g75qShheNnuua2l3Qk_80NBQqx7ueQ2gSoDRY&sig=ALgxI2wwRQIhAIXrrCRXTbIZmsO8ZKRVtP8M3G9mewIBXOn6W4Yu94sEAiBIbXJPJjyLz-mNT32qtz74rkxrPoBwCm1AJbgZ6oQ3VQ==
Screen Shot 2020-02-10 at 10 33 17 PM
Screen Shot 2020-02-10 at 10 36 09 PM

Typescript definition

@chaimPaneth before starting, thanks a lot for your library! We are currently using it in our team, and your work helped us a lot!

Since we are using Typescript, we added a basic typescript definition in our project but I've figured that I could spend more time to make it exhaustive and open a PR here. Are you encline to have and maintain typescript definition in this repo ? As I said I can open a PR to add typescript definitions for the current API.

Cheers!

Crash on android 9-10

From crashlytics. Latest version 2020-02-02

Fatal Exception: java.lang.IllegalArgumentException
Service not registered: com.appgoalz.rnjwplayer.RNJWPlayerView$1@7843d02
android.app.LoadedApk.forgetServiceDispatcher (LoadedApk.java:1344)

android.content.ContextWrapper.unbindService (ContextWrapper.java:655)
CRASH >>> com.appgoalz.rnjwplayer.RNJWPlayerView.doUnbindService (RNJWPlayerView.java:625)

Playlist in Android not working

I made a playlist with playlistItems and in iOS worked, Android don't.
Am i missing something? Or it's a feature to add in the feature?

android jwplayer not displayed

import React, { Component } from 'react';
import {
StyleSheet,
View,
} from 'react-native';
import JWPlayer from 'react-native-jw-media-player';

const styles = StyleSheet.create({
container: {
flex: 1,

},
player: {
width:"100%",
height:250
},
});

export default class App extends Component {
componentDidMount(){
console.log(JWPlayer);
}

onBeforePlay() { // eslint-disable-line
// console.log('onBeforePlay was called');
}

onPlay() { // eslint-disable-line
// console.log('onPlay was called');
}

onPlayerError(error) { // eslint-disable-line
// console.log('onPlayerError was called with error: ', error);
}

onBuffer() { // eslint-disable-line
// console.log('onBuffer was called');
}

onTime({ position, duration }) { // eslint-disable-line
// console.log('onTime was called with: ', position, duration);
}

render() {
return (

<JWPlayer
style={styles.player}
autostart={true}
file={'http://cn7.kankia.com/hls/20200107/0381bd7aa19679e00989a253172bd7e1/1578381712/index.m3u8'}
onBeforePlay={() => this.onBeforePlay()}
onPlay={() => this.onPlay()}
controls={true}
onPlayerError={e => this.onPlayerError(e)}
onBuffer={() => this.onBuffer()}
onTime={time => this.onTime(time)}
/>

);
}
}

Android video is black after going in/out fullscreen

Latest version used
0.1.40

On android going into full screen mode video is black screen. Audio still playing normally. After seeking into other time or pressing settings & back video is shown again. Sometimes same thing replicated on going back out of full screen.

EDIT: play/pause also helps

NSMicrophoneUsageDescription info.plist error

Hi after upgrading to a newest version 0.1.49 and adding everything required by casting I receive this email from apple:
...The app's Info.plist file should contain a NSMicrophoneUsageDescription key with a user-facing purpose string...
Should this be mentioned in readme ?
And why does it need a microphone usage?

when chromecast support?

I am implementing JWPlayer on my RN app.
It's working well but unfortunately, seems it is not supported for chromecast.

If someone knows that, I am appreciate.

Thanks

CHANGELOG.md or Release Notes

Hello, I don't see any easy way to see what's changed between versions. Can you let me know if I've missed that somewhere? Otherwise I do recommend keeping a CHANGELOG.md or tagging your releases on Github w/ accompanying documentation. Appreciate your work!

Example does not work

Executing the example project gives an error in iOS:

Ordered comparison between pointer and zero ('NSNumber *' and 'int')
In line 32 of file RCJavaScriptLoader.mm

Android is not working too...

TypeError: Cannot read property 'message' of undefined
at handleError (/Users/.../Documents/Demos/react-native-jw-media-player-master/Example/node_modules/react-native/local-cli/cliEntry.js:35:21)

error: Build input file cannot be found

Hii, I am not able to run my project in xcode.

error: Build input file cannot be found: '/Users/user/WorkSpace/git/slp/node_modules/react-native-jw-media-player/ios/CustomJWPlaylistItem.m' (in target 'RNJWPlayer' from project 'RNJWPlayer')

Seems like CustomJWPlaylistItem.m file is missing. I have tried to run pod install. Link and relink the library multiple times but it didn't work.

Project dependencies:
"react-native-jw-media-player": "0.1.32",
"react": "^16.8.3",
"react-native": "^0.59.10"

Android Fullscreen Bound to Parent Container

When clicking on the fullscreen button, the app changes orientation but does not take over the display. It appears that the player goes into fullscreen of the container that it is in, rather than taking over the screen.

We invoke the player using
const playlistItem = { file: 'sample.com', mediaId: 'sample', autostart: false }

            <JWPlayer
                playlistItem={playlistItem}
                style={styles.player}
                onBeforePlay={() => this.printSomething("onBeforePlay", null)}
                onPlay={() => this.printSomething("onPlay", null)}
                onPause={() => this.printSomething("onPause", null)}
                onIdle={() => this.printSomething("onIdle", null)}
                onPlaylistItem={event => this.printSomething("onPlaylistItem", event)}
                onSetupPlayerError={event => this.printSomething("onSetupPlayerError",event)}
                onPlayerError={event => this.printSomething("onPlayerError", event)}
                onBuffer={() => this.printSomething("onBuffer", null)}
                onFullScreen={() => this.onFullScreen()}
                onPlayerReady={() => this.onPlayerReady()}
                onFullScreenExit={() => this.onFullScreenExit()}
            />

RN version: 0.57.4
JWPlayer: 3.7.0
react-native-jw-media-player: 0.1.12

aar artifact file outdated

When installing the library, the android aar files generated is outdated and references old code.

Version 0.1.23

Build input file cannot be found.

Build input file cannot be found: '../node_modules/react-native-jw-media-player/ios/CustomJWPlaylistItem.m'

This file is not currently in this repo, however, when I checkout the forks on this repo, it is present. Why was this file removed?

Request for additional callbacks

Requesting few more callbacks:
onComplete - when media has reached the ending.
onSeek - when seek was requested from default controls.

Isn't onIdle the same as my requested onComplete? If so it does not work android.

Also onTime callback does not return described parameters (checked android).

Volume Control

Hi. Is there any way we could control the volume or mute?

Thanks

onFullScreen issue

On latest version on Android callback onFullScreenExit is not called.
When exiting fullscreen onFullScreen is called instead onFullScreenExit

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.