Coder Social home page Coder Social logo

react-native-af-video-player's Introduction

react-native-af-video-player

npm version npm downloads npm licence Platform npm

A customisable React Native video player for Android and IOS

Demo

Features

  • Fullscreen support for Android and iOS!
  • Works with react-navigation
  • Optional action button for custom use
  • Add your own logo and/or placeholder
  • Customise theme

Install

npm i -S react-native-af-video-player

Then link

react-native link react-native-video
react-native link react-native-keep-awake
react-native link react-native-vector-icons
react-native link react-native-orientation
react-native link react-native-linear-gradient

Simple Usage

import React from 'react'
import { AppRegistry, StyleSheet, View } from 'react-native'
import Video from 'react-native-af-video-player'

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center'
  }
})

const url = 'https://your-url.com/video.mp4'

class VideoExample extends React.Component {

  render() {
    return (
      <View style={styles.container}>
        <Video url={url} />
      </View>
    )
  }
}

AppRegistry.registerComponent('VideoExample', () => VideoExample)

Props

Prop Type Required Default Description
url string, number Yes A URL string (or number for local) is required.
autoPlay bool No false Autoplays the video as soon as it's loaded
loop bool No false Allows the video to continuously loop
title string No '' Adds a title of your video at the top of the player
placeholder string No undefined Adds an image placeholder while it's loading and stopped at the beginning
logo string No undefined Adds an image logo at the top left corner of the video
theme string No 'white' Adds an optional theme colour to the players controls
hideFullScreenControl bool No false This hides the full screen control
style number, object No {} Apply styles directly to the Video player (ignored in fullscreen mode)
resizeMode string No 'contain' Fills the whole screen at aspect ratio. contain, cover etc
rotateToFullScreen bool No false Tapping the fullscreen button will rotate the screen. Also rotating the screen will automatically switch to fullscreen mode
fullScreenOnly bool No false This will play only in fullscreen mode
inlineOnly bool No false This hides the fullscreen button and only plays the video in inline mode
playInBackground bool No false Audio continues to play when app enters background.
playWhenInactive bool No false [iOS] Video continues to play when control or notification center are shown.
rate number No 1 Adjusts the speed of the video. 0 = stopped, 1.0 = normal
volume number No 1 Adjusts the volume of the video. 0 = mute, 1.0 = full volume
onMorePress function No undefined Adds an action button at the top right of the player. Use this callback function for your own use. e.g share link
onFullScreen function No (value) => {} Returns the fullscreen status whenever it toggles. Useful for situations like react navigation.
onTimedMetadata function No undefined Callback when the stream receives metadata
scrollBounce bool No false Enables the bounce effect for the ScrollView
lockPortraitOnFsExit bool No false Keep Portrait mode locked after Exiting from Fullscreen mode
lockRatio number No undefined Force a specific ratio to the Video player. e.g. lockRatio={16 / 9}
onLoad function No (data) => {} Returns data once video is loaded
onProgress function No (progress) => {} Returns progress data
onEnd function No () => {} Invoked when video finishes playing
onError function No (error) => {} Returns an error message argument
onPlay function No (playing) => {} Returns a boolean during playback
error boolean, object No true Pass in an object to Alert. See https://facebook.github.io/react-native/docs/alert.html
theme object No all white Pass in an object to theme. (See example below to see the full list of available settings)
controlDuration number No 3 Set the visibility time of the pause button and the progress bar after the video was started

Referencing

To toggle play/pause manually, you can do it like so:

  const theme = {
    title: '#FFF',
    more: '#446984',
    center: '#7B8F99',
    fullscreen: '#446984',
    volume: '#A5957B',
    scrubberThumb: '#234458',
    scrubberBar: '#DBD5C7',
    seconds: '#DBD5C7',
    duration: '#DBD5C7',
    progress: '#446984',
    loading: '#DBD5C7'
  }

  class MyComponent extends Component {

    play() {
      this.video.play()
      this.video.seekTo(25)
    }

    pause() {
      this.video.pause()
    }

    render() {
      return (
        <View>
          <Video
            url={url}
            ref={(ref) => { this.video = ref }}
            theme={theme}
          />
          <Button onPress={() => this.play()}>Play</Button>
          <Button onPress={() => this.pause()}>Pause</Button>
        </View>
      )
    }
  }

Issues

Container

Avoid adding alignItems: 'center' to the container, it can cause fullscreen mode to disappear :D

React Navigation

If you’re using react-navigation you need to manually hide the headers / tab bars to take advantage of fullscreen videos.

Example

import React, { Component } from 'react'
import { StyleSheet, View, ScrollView, Alert, Text } from 'react-native'

import Video from 'react-native-af-video-player'

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

class ReactNavigationExample extends Component {

  static navigationOptions = ({ navigation }) => {
    const { state } = navigation
    // Setup the header and tabBarVisible status
    const header = state.params && (state.params.fullscreen ? undefined : null)
    const tabBarVisible = state.params ? state.params.fullscreen : true
    return {
      // For stack navigators, you can hide the header bar like so
      header,
      // For the tab navigators, you can hide the tab bar like so
      tabBarVisible,
    }
  }

  onFullScreen(status) {
    // Set the params to pass in fullscreen status to navigationOptions
    this.props.navigation.setParams({
      fullscreen: !status
    })
  }

  onMorePress() {
    Alert.alert(
      'Boom',
      'This is an action call!',
      [{ text: 'Aw yeah!' }]
    )
  }

  render() {

    const url = 'https://your-url.com/video.mp4'
    const logo = 'https://your-url.com/logo.png'
    const placeholder = 'https://your-url.com/placeholder.png'
    const title = 'My video title'

    return (
      <View style={styles.container}>
        <Video
          autoPlay
          url={url}
          title={title}
          logo={logo}
          placeholder={placeholder}
          onMorePress={() => this.onMorePress()}
          onFullScreen={status => this.onFullScreen(status)}
          fullScreenOnly
        />
        <ScrollView>
          <Text>Some content here...</Text>
        </ScrollView>
      </View>
    )
  }
}

export default ReactNavigationExample

http vs https

For your sanity you should use https especially if you’re planning to use this for iOS. Using http will not work due to App Transport Security Settings will result in AppStore rejection.

Fullscreen videos inside a ScrollView

If you need the video inside a ScrollView, use our ScrollView instead: The reason for this is because we need to hide all of it's content due to ScrollView styling challenges when enabling fullscreen mode. We wouldn't want you deal with that headache, instead let this component handle it :) You can also apply styles to the video by wrapping our Container around it. Note: wrapping the video with your own element can cause fullscreen defects. Also having multiple videos in a ScrollView isn't perfect, so use at your own risk.

Example

  import Video, { ScrollView, Container } from 'react-native-af-video-player'

  const styles = StyleSheet.create({
    container: {
      flex: 1
    },
    videoContainer: {
      margin: 10
    }
  })

  class VideoInScrollView extends React.Component {

    render() {
      return (
        <ScrollView style={styles.container}>

          <Text>Some content above</Text>

          <Container style={styles.videoContainer}>
            <Video
              autoPlay
              url={url}
              title={title}
              logo={logo}
              placeholder={logo}
              rotateToFullScreen
            />
          </Container>

          {/* Or use without the Container */}
          <Video
            autoPlay
            url={url}
            title={title}
            logo={logo}
            placeholder={logo}
            rotateToFullScreen
          />

          <Text>Some content below</Text>

        </ScrollView>
      )
    }
  }

To Do

  • Option to use custom icons
  • Support Immersive mode for Android
  • improve multiple videos fullscreen support within a ScrollView
  • investigate subtitle support
  • Improve scrubber controls for iOS
  • Provide fullscreen support within a ScrollView
  • Customise specific components for better theming

MIT Licensed

react-native-af-video-player's People

Contributors

abbasfreestyle avatar benchov avatar thomaslarge avatar vasilnikolov 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

react-native-af-video-player's Issues

What video format does this support?

Hello, there.
I am very fine to find this.
But I have one question about using this.
Please let me know what video format this support.
Thank you a lot.

do not show fullscreen within scrollview

Hello admin, how can I show fullscreen if the videoplayer component is within scrollview ?
I know u have pointed this issue, but how can I show fullscreen?
Thanks for your awesome video player.

warnings and error

"react-native": "0.54.1",
"react-native-af-video-player": "^0.2.0",
OS : windows 10

i am getting these sometimes when full screen pressed sometimes

1)Warning:Failed prop type: Invalid prop color supplied to Icon.
in Icon (at Video.js:316)

2)Warning: Failed prop type: Invalid prop color supplied to Text: [object Object]
Valid color formats are

  • '#f0f' (#rgb)
  • '#f0fc' (#rgba)
  • '#ff00ff' (#rrggbb)
  • '#ff00ff00' (#rrggbbaa)
  • 'rgb(255, 255, 255)'
  • 'rgba(255, 255, 255, 1.0)'
  • 'hsl(360, 100%, 100%)'
  • 'hsla(360, 100%, 100%, 1.0)'
  • 'transparent'
  • 'red'
  • 0xff00ff00 (0xrrggbbaa)

Bad object: {
"fontSize": 60,
"color": {
"title": "#FFF",
"more": "#FFF",
"center": "#FFF",
"fullscreen": "#FFF",
"volume": "#FFF",
"scrubberThumb": "#FFF",
"scrubberBar": "#FFF",
"seconds": "#FFF",
"duration": "#FFF",
"progress": "#FFF",
"loading": "#FFF"
},
"fontFamily": "MaterialIcons",
"fontWeight": "normal",
"fontStyle": "normal"
}
in Text (at create-icon-set.js:82)
in Icon (at Video.js:316)

3)TypeError: Cannot read property 'seek' of null
This error is located at:
in Video

aferror1

aferror2

aferror3

zIndex does not work in ios

in iOS while in full screen the video controls are hidden by the parent component and are not "moving" to the front.
on Android its working fine

UPDATE
I change zIndex of the siblings and parent components to fix this issue.

Fullscreen doesn't expand fullscreen, but expands inside the container.

The component is called in here with Video props:

<View style={{ flex: 1 }}>
<VideoPlayer
video={{
name: 'video file',
poster: 'poster',
videoStyle: styles.backgroundVideo
}}
/>

Styles:
backgroundVideo: {
position: 'relative',
top: 0,
left: 0,
bottom: 0,
right: 0,
width: null,
height: 200
}

The video player:

class VideoPlayer extends Component {
render() {
return (

export default VideoPlayer;

When I click the fullscreen button in controls, then I get the behaviour you see in the image.

  • react-native-af-video-player version: @0.1.7
  • React Native version:@0.53.3
  • OS: Both Android and iOS
    fullscreenclicked
    normal

Thanks in advance, really appreciated

Getting error on android, works fine on ios

I get this error when trying to play video on android:

nayttokuva 2017-11-26 kello 0 04 17

On ios it works smoothly. Here's the render function:

render() { return ( <VideoPlayer url={"https://vjs.zencdn.net/v/oceans.mp4"} title={"video"} placeholder={"https://vjs.zencdn.net/v/oceans.png"} /> ) }

this.video.pause() method is not working.

The pause method mentioned in the docs is not working as expected. It does not pause the video when the pause() method is triggered

react-native-af-video-player version: v0.2.0
React Native version: 0.55.4
OS: Android 8.0

Uglify-JS removes fn-names

When compiling the player using react-native and minify enabled the minifier removes (default option) all function names. This leads to an issue using the fullscreen scrolling view:

  1. Compile without (!) --minify

  2. Start fullscreen within provided scrollview => Working

  3. Compile with --minify

  4. Start fullscren within provided scrollview => NOT working

Quickfix: Disable function name mangling inside the minifier node module:

In node_modules/uglifyjs-webpack-plugin/dist/uglify/minify.js

...
function minify(inputCode, inputMap) {
  const result = uglify.minify(inputCode, {
  keep_fnames: false
...

Full Screen on Multi-video Scrollview

    <ScrollView style={{ flex: 1 }}>
        <Text>{"Text message"}</Text>
        <Container>
          {this.state.url != null ? (
            <Video
              url={this.state.url}
              rotateToFullScreen={true}
              lockPortraitOnFsExit={true}
            />
          ) : (
            <View />
          )}
        </Container>
        {this.state.url != null ? (
          <Video
            url={this.state.url}
            rotateToFullScreen={true}
            lockPortraitOnFsExit={true}
          />
        ) : (
          <View />
        )}
        <Text>{"Text message"}</Text>
      </ScrollView>

Explanation:
I am trying to use scrollview to include multiple videos in my view. Including the videos works awesome! Thanks for your awesome component. The problem that I am facing is more towards full screen of the videos. Like in the images attached (the third screen shot) below, you can see that when I click on the full screen button on the second video, the first one gets full screen and the other one is played.

Though the result that I would expecting was the other way round. Any help on that matter would be well appreciated.

Thanks.

  • Are there any console logs?

  • Include Screeshots / Video:

screen shot 2018-05-25 at 5 26 43 pm

screen shot 2018-05-25 at 5 27 02 pm

screen shot 2018-05-25 at 5 27 13 pm

Video:
SampleVideo.mp4.zip

Very cool

This is a very cool package, is it ready for release?

Autoplay Vertical Video in Fullscreen?

I can play Vertical Video and it goes to FullScreen if i press the Button, but if i set fullScreenOnly, it automatically rotates.
I want it to go FullScreen without Rotation?

Infinity Progress - was (Unrecognized selector)

Hi Guys, nice lib. But I'm was testing and android worked fine, but IOS I get this error when click over the video (play or pause) . iOS 11.2.

After closing the red screen appears to work fine. ( in debug mode)

"react-native": "0.47.1",
"react-native-af-video-player": "^0.1.3",
"react-native-video": "2.0.0"

Have you faced this problem? Check the image with the original message.

image

how to pass when video when its background ios and android.

When creating an issue, please ensure that you provide as much information as you can. Issues with a basic description will sadly be ignored as it doesn't help diagnose the issue :(

If you don't help me, I can't help you ¯\_(ツ)_/¯

Here are some common things to include that can help your issue be diagnosed.

  • react-native-af-video-player version:

  • React Native version:

  • OS:

  • Has this issue already been raised?

  • Have you clearly read and understood the Readme?

  • Code and explanation to replicate this issue:

  • Are there any console logs?

  • Include Screeshots / Video:

Error!

"Error calling RCTEventEmitter.receiveEvent" on IOS react-native

Any suggestions to fix this ?

TypeError: In this environment the sources for assign MUST be an object. This error is a performance optimization and not spec compliant

I am just using a simple demo example provided in this repo.

  • [ ^0.1.9 ] react-native-af-video-player version:

  • [ 0.54.4 ] React Native version:

  • [ MacOs 10.13.4] OS:

  • [No ] Has this issue already been raised?

  • [ Yes] Have you clearly read and understood the Readme?

  • Code and explanation to replicate this issue:

  • Are there any console logs?

  • Include Screeshots / Video:
    screen shot 2018-04-30 at 2 19 03 pm

My example code

import React, {Component} from "react";
import { StyleSheet, View } from "react-native";
import Video from "react-native-af-video-player";

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
  }
});

const uri = "http://techslides.com/demos/sample-videos/small.mp4"

export default class DemoVideo extends Component {

  render() {
    return (
      <View style={styles.container}>
        <Video url={uri} />
      </View>
    )
  }
}

suggestion

when I finish the video page in my APP,I found the other pages can also rotate ,I think you should remove the orientation listener when the conponent unmount in the video page so that it will not influence on the other pages

Progress bar not visible in Android

My progress bar is not visible in Android :(
on iOS its working fine.
I did not touched your code regarding the progress bar

UPDATE
it started to work

suggestion: videoCover OR video component

Hi @abbasfreestyle ,
I'd like to recommend small update that can improve application performance when using this package.
Once again, great package...I am using it and its solved my fullScreen issue
I think that the rendering should be done like this:

renderVideoCover() {
  ...render the video cover with play button and all the styling
}

renderVideoPlayer() {
  ...render the video player and controls
}

render() {
  if (showVideoCover) return this.renderVideoCover();
  return this.renderVideo();
}

That way when the app navigate to a screen with the video component it won't try to fetch the video immediately but only after the user tap the play button.

This will:

  1. reduce the amount of video fetching - reduce data transfer.
  2. in case of an error, for example network error - will show the error just after the user tap the play button and not when the user navigate to a screen with the video component.

Cannot skip through video

Hi I have noticed I am unable to skip through the video when I want to go to a certain part of the video, instead it will just start from the beginning again.

ios not play audio

  • react-native-af-video-player version:1.19
  • React Native version: 0.54.0
  • OS: ios

Is any one nitce this issue - Android play audio (mp3) fine ios not

Any one can support?

inline issues after toggling from full screen

Hi @abbasfreestyle,

  1. Sometimes when toggling from full screen to inline I see black bars above and below the video, as if the video does not fill the entire videoContainer.
  2. The video container not always returning to inline, as if the height of the container does not update in time :(

Did you encounter this issues?
I have to say I did not use the package as blackBox but used parts of it and change few things - like icons, video cover, error etc.

custom onScroll in scrollView

hi,
Is it possible to refactor onScroll method in the custom ScrollView -
I want to be able to connect the scrolling to an animation header, same as it is done here or here the scrollView.

the onScroll method is:

<RNScrollView
        {...scrollProps}
        ref={(scroll) => { this.scroll = scroll }}
        bounces={fullscreen ? !fullscreen : bounces}
        onScroll={(event) => {
          if (!fullscreen) this.scrollPos = event.nativeEvent.contentOffset.y
          onScroll()  <- I don't understand to which onScroll you are calling here
        }}
        scrollEventThrottle={scrollEventThrottle}
      >
        {this.renderChildren(children)}
</RNScrollView>

I am trying to do something like this, the modifications I did in the ScrollView.js are:

  1. from:
    import { ScrollView as RNScrollView } from 'react-native';
    to:
    import { Animated } from 'react-native';

  2. from:

scrollBackToPosition() {
        if (this.scroll) this.scroll.scrollTo({ y: this.scrollPos, animated: false });
    }

to:

        if (this.scroll) this.scroll.scrollTo({ y: this.props.scrollY, animated: false });
    }
  1. from:
render() {
    const { fullscreen } = this.state
    const {
      bounces,
      children,
      onScroll,
      scrollEventThrottle,
      ...scrollProps
    } = this.props
    return (
      <RNScrollView
        {...scrollProps}
        ref={(scroll) => { this.scroll = scroll }}
        bounces={fullscreen ? !fullscreen : bounces}
        onScroll={(event) => {
          if (!fullscreen) this.scrollPos = event.nativeEvent.contentOffset.y
          onScroll()
        }}
        scrollEventThrottle={scrollEventThrottle}
      >
        {this.renderChildren(children)}
      </RNScrollView>
    )
  }

to:

render() {
        const { fullscreen } = this.state;
        const {
            bounces,
            children,
            onScroll,
            scrollEventThrottle,
            scrollY, <- passed from out side, `scrollY: new Animated.Value(0)`
            ...scrollProps
        } = this.props;
        return (
            <Animated.ScrollView
                {...scrollProps}
                styles={{ flex: 1 }}
                ref={(scroll) => { this.scroll = scroll; }}
                bounces={fullscreen ? !fullscreen : bounces}
                onScroll={Animated.event(
                    (!this.state.fullScreen)
                        ? [{
                            nativeEvent: { contentOffset: { y: scrollY } },
                        }]
                        : undefined,
                    onScroll(),
                )}
                scrollEventThrottle={scrollEventThrottle}
            >
                {this.renderChildren(children)}
            </Animated.ScrollView>
        );
    }

But for some reason the content of the scrollView is visible and the video element is "behind" it - at least half a screen.
One important thing to say, the video is place outside of the scroll view, so maybe I don't need the custom scroll view?

error playing this video (on every video)

When creating an issue, please ensure that you provide as much information as you can. Issues with a basic description will sadly be ignored as it doesn't help diagnose the issue :(

If you don't help me, I can't help you ¯\_(ツ)_/¯

Here are some common things to include that can help your issue be diagnosed.

  • react-native-af-video-player version: 0.1.7

  • React Native version: 0.50

  • OS: OS-X

  • Has this issue already been raised? No

  • Have you clearly read and understood the Readme? Yes

  • Are there any console logs? No

  • Code and explanation to replicate this issue: Just the default example code, but no video is working.

  • Include Screeshots / Video: image
    image

Autoplay does not work

When creating an issue, please ensure that you provide as much information as you can. Issues with a basic description will sadly be ignored as it doesn't help diagnose the issue :(

If you don't help me, I can't help you ¯\_(ツ)_/¯

Here are some common things to include that can help your issue be diagnosed.

  • react-native-af-video-player version: 0.19

  • React Native version: React Native version: 0.50

  • OS: OS-X

  • Has this issue already been raised? No

  • Have you clearly read and understood the Readme? Yes

  • Code and explanation to replicate this issue: The Autoplay does not trigger.
    image

  • Are there any console logs? No

  • Include Screeshots / Video:
    image

Possible enhancement. onPlay function

would be really useful, so i can stop other videos when a new one starts playing. right now i am using onProgress for this, which is not a very clean solution.

placeholder

placeholder issues:
I am passing an image to the package to "play" as a placeholder but:
In IOS device it is placed under the video component and no inside.
in Android it does not visible at all.

I want that the first image of a video will be the placeholder, the videos are stored on the cloud.
I tried to save the first image locally for that.
Or the package takes the 1st image of the video automatically?

OR why not use poster of react-native-video

SOLVED
I just updated image style in Video.js:

image: {
        ...StyleSheet.absoluteFillObject,
        width: '100%', // <- added
        height: '100%', // <- added
        zIndex: 99,
},

Great package!!

custom icons

Hi,
I was looking for a video package with fullScreen solution.
react-native-video was almost good enough, and this package looks like the package for me.
Just one question, how can I use my icons - play, pause, fullScreen, existFullScreen instead of the one the package is using?

As I understood, you handle full screen with styles, right?

fullScreen: {
   ...StyleSheet.absoluteFillObject
 },
 inline: {
   height: Win.width * 0.5625,
   alignSelf: 'stretch'
 },

View Config not found for name BVLinearGradient

First try and this happened. I just copy paste your sample code.

"react": "16.3.1",
"react-native": "0.55.3",
"react-native-af-video-player": "^0.1.9",
OS : window 10. Test on Emulator Nexus 5 Api 23

capture2

capture

Subtitle Support

would I have to add support for .srt or .vtt subtitles?

sorry for my bad english

FullScreen

How to make the video page keep fullscreen mode and hide the fullscreen button default when I enter it?I use the 'fullScreenOnly',but it cannot solve the problem.
Here is my code:
<Video
url={url}
title={title}
//logo={logo}
placeholder={placeholder}
fullScreenOnly={true}
//theme={'#DB3843'}
lockPortraitOnFsExit
/>

Better seek support

Hello everyone!

I'm trying to use seek, but it's not working so well.

On the first try, i simply tried to use seek this way.

<Video 
    url={props.video.signedUrl}
    title={props.video.title}
    ref={(ref) => {this.video = ref}}
    onFullScreen={status => this.onFullScreen(status)}
    rotateToFullScreen
/>

<Button onPress={() => this.video.seek(20)}> seek </Button>

But when i do this, the player go to a very high (above the duration) number of seconds, so i tried to see the implementation to understand what was going on and i saw this:

 seek(val) {
    const currentTime = val * this.state.duration
    this.setState({ seeking: true, currentTime })
  }

I confess that i don't understand why multiply val by duration of video. So i tried to make a modification and use react-native-video seek

 seek(val) {
    const currentTime = val * this.state.duration
    this.player.seek(val)
    this.setState({ seeking: true, currentTime })
  }

Worked in some way. On click, i was able to seek the video though the expected time, but the timer in controls got stucked in this expected time.

So, i'm missing something? I went wrong somewhere? How do i properly seek?

Thanks in advance and congratulations on this work, this is the best react-native player that i worked so far 😄

  • react-native-af-video-player version: 0.1.9
  • react-native version: 0.48.3
  • Android 8.0 via Android Virtual Device

option to lock to portrait after fullscreen

After fullscreen is disabled you are calling Orientation.unlockAllOrientations(), but my App generally is locked to Portrait, which causes it to bounce around.
Maybe you could add an lockTo option.
Anyways, thanks a lot for the project, keep it up

On fullscreen toggel icons are not displayed

In fullscreen mode the bottom ControlBar( toggle, fullscreen, slider, volume control) is not displayed. Pause, title ui elements are shown.

Here are some common things to include that can help your issue be diagnosed.

  • react-native-af-video-player version: 0.1.9

  • React Native version: 0.55.2

  • OS: mac 10.13.4

  • Has this issue already been raised? No

  • Have you clearly read and understood the Readme? Yes

  • Code and explanation to replicate this issue:
    <VideoPlayer
    url={ s3Url }
    autoPlay={ true }
    onLoad={ this.onLoad }
    onProgress={ this.onProgress }
    onEnd={ this.onEnd }
    onError={ this.onError }
    ignoreSilentSwitch={ "ignore" }
    onFullScreen={ this.onFullScreen }
    title={ video.title }

              />
    

    This is inside a React StackNavigator.

  • Are there any console logs?

  • Include Screeshots / Video:

Open Youtube video from URL

Old : How to solve this problem
BVLinearGradient does not exist

Revision : Can this plugin open Youtube Video from Youtube URL ?

vedio is not playing on iOS but working fine on android.

  • [ 0.1.7] react-native-af-video-player version:

  • [ 0.51.0] React Native version:

  • [ xcode 9.1] OS:

  • [ no] Has this issue already been raised?

  • [yes ] Have you clearly read and understood the Readme?

  • Code and explanation to replicate this issue:

  • Are there any console logs?

  • Include Screeshots / Video:
    screen shot 2018-03-30 at 6 49 18 pm
    Facing an issue while playing video on iOS..

onFullScreen ISSUE

when the full screen button is clicked the onFullScreen is calling many times at one click and showing and hiding the other views is getting problem as I am using onFullScreen function to render my views

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.