Skip to main content

Video Player Screen

Overview

The VideoPlayer screen allows users to view and interact with video content within the LikeMinds chat application. It provides an intuitive interface for playing, pausing, and seeking through videos, enhancing the overall multimedia experience. This screen likely supports various video formats and offers additional features, such as fullscreen viewing and playback controls, ensuring users can enjoy video content seamlessly.

LMFeedMediaPreviewScreen

Data Variables

  • url: URL of the video to be rendered.

Props

PropertyTypeDescriptionRequired
urlstringThe URL of the video to be played.✔️

Usage Example

  • In your App.tsx, create a Stack.Navigatorin the NavigationContainer wrapped byLMOverlayProvider.
  • Add VideoPlayer as a Stack screen in your NavigationContainer.
App.tsx
import { VIDEO_PLAYER, VideoPlayer } from "@likeminds.community/chat-rn-core";
import { NavigationContainer } from "@react-navigation/native";
import { createNativeStackNavigator } from "@react-navigation/native-stack";

export const App = () => {
const Stack = createNativeStackNavigator();
return (
<LMOverlayProvider
myClient={myClient} // pass in the LMChatClient created
apiKey={apiKey} // pass in the API Key generated
userName={userName} // pass in the logged-in user's name
userUniqueId={userUniqueID} // pass in the logged-in user's uuid
>
<NavigationContainer ref={navigationRef} independent={true}>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen
name={"VideoPlayer"}
component={VideoPlayer}
initialParams={{ url: "" }}
/>
</Stack.Navigator>
</NavigationContainer>
</LMOverlayProvider>
);
};