100mslive / 100ms-react-native Goto Github PK
View Code? Open in Web Editor NEWReact Native Live Streaming, Video Conferencing SDK & Sample App
Home Page: https://www.100ms.live/
License: MIT License
React Native Live Streaming, Video Conferencing SDK & Sample App
Home Page: https://www.100ms.live/
License: MIT License
Build a basic video conferencing application using our React Native SDK
Features -
Example: https://docs.100ms.live/javascript/v2/guides/react-quickstart
To be created in a Markdown file
@objcMembers public class HMSPeer : NSObject {
public let peerID: String
public var name: String
public let isLocal: Bool
public var role: HMSSDK.HMSRole?
public let customerUserID: String?
public var customerDescription: String?
public var audioTrack: HMSAudioTrack?
public var videoTrack: HMSVideoTrack?
public var auxiliaryTracks: [HMSTrack]?
}
Steps for -
Example: https://docs.100ms.live/javascript/v2/features/integration
To be created in a Markdown file
Example: https://docs.100ms.live/api-reference/javascript/v2/home/content
In Markdown format
https://docs.100ms.live/javascript/v2/features/error-handling
public func preview(config: HMSConfig, delegate: HMSPreviewListener)
@objc public protocol HMSPreviewListener: AnyObject {
@objc(onPreview:localTracks:) func onPreview(room: HMSRoom, localTracks: [HMSTrack])
@objc(onError:) func on(error: HMSError)
}
Join a meeting
popup every time even after entering my name. Leave meeting and then try to re-join.error Cannot find module 'metro-config/src/defaults/blacklist'
Fix
const blacklist = require('metro-config/src/defaults/exclusionList');
error: Error: Unable to resolve module ../screens/Home
Fix
Rename the /screens/home.js to Home.js
But still ended up continuous errors while trying to run the example project. Is there any working version available?
addSink:
In HMSSDK
/// Requests a change of role for specified peer.
/// - Parameters:
/// - peer: The peer whose role should be changed.
/// - role: The target role.
/// - force: False if the peer should be prompted to accept the new role. true if their role should be changed without a prompt.
/// - completion: The completion handler to be invoked when the request succeeds or fails with an error.
public func changeRole(for peer: HMSPeer, to role: HMSRole, force: Bool = false, completion: ((Bool, HMSError?) -> Void)? = nil)
/// Call to accept the role change request sent to the current peer.
/// Once this method is called, the peer's role will be changed to the requested one.
/// - Parameters:
/// - request The request that the SDK had sent to this peer (in HMSUpdateListener.onRoleChangeRequest).
/// - completion: The completion handler to be invoked when the request succeeds or fails with an error.
public func accept(changeRole request: HMSRoleChangeRequest, completion: ((Bool, HMSError?) -> Void)? = nil)
/// To change the mute status of a remote HMSTrack.
/// - Parameters:
/// - remoteTrack: The HMSTrack whose mute status needs to be changed.
/// - mute: True if the track needs to be muted, false otherwise.
/// - completion: The completion handler to be invoked when the request succeeds or fails with an error.
public func changeTrackState(for remoteTrack: HMSTrack, mute: Bool, completion: ((Bool, HMSError?) -> Void)? = nil)
In UpdateListener
/// This is called when a role change request arrives
/// - Parameter roleChangeRequest: the request for role change info
@objc(roleChangeRequest:) optional func on(roleChangeRequest: HMSRoleChangeRequest)
/// This is called when a change track state request arrives
/// - Parameter changeTrackStateRequest: the request for changing track state
@objc(changeTrackStateRequest:) optional func on(changeTrackStateRequest: HMSChangeTrackStateRequest)
// HMSTrack
open class HMSTrack : NSObject {
open var trackId: String { get }
open var kind: HMSTrack! { get }
open var source: Int32 { get }
open var trackDescription: String { get }
open func isMute() -> Bool
}
The callbacks to be included are -
SDK name: react-native-hms
Example app Bundle ID: live.100ms.reactnative
Example app Display name: RN 100ms
@objcMembers public class HMSConfig : NSObject {
/// the name that the user wants to be displayed while in the room
public let userName: String
public let userID: String
public let roomID: String
/// the auth token to be used
public let authToken: String
public let shouldSkipPIIEvents: Bool
/// any json string or metadata that can be passed while joining
public let metaData: String?
/// to override the default endpoint (advanced)
public let endpoint: String?
public init(userName: String = "iOS User", userID: String, roomID: String, authToken: String, shouldSkipPIIEvents: Bool = false, metaData: String? = nil, endpoint: String? = nil)
}
If a user pastes a meeting like https://yogi.app.100ms.live/preview/muggy-ultramarine-fish in the Room ID field, they should be able to join the room
public struct HMSRole : Codable {
public let name: String
public let publishSettings: HMSPublishSettings
public let subscribeSettings: HMSSubscribeSettings
public let permissions: HMSPermissions
public let priority: Int
public let generalPermissions: [String : String]?
public let internalPlugins: [String : String]?
public let externalPlugins: [String : String]?
}
The sample app should be able to join rooms created via the Dashboard: https://dashboard.100ms.live/
For example, clicking on this room link should open the React Native sample app: https://yogi.app.100ms.live/preview/muggy-ultramarine-fish
Example: https://docs.100ms.live/android/v2/features/Join
https://docs.100ms.live/android/v2/features/Leave
To be created in Markdown file
@objcMembers public class HMSRoom : NSObject {
public let id: String
public let name: String
public let metaData: String?
public var peers: [HMSSDK.HMSPeer]
}
Example: https://docs.100ms.live/javascript/v2/features/mute
To be created in Markdown file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.