{"id":16454638,"url":"https://github.com/opengeekslab/rnopentok","last_synced_at":"2025-07-31T12:37:41.439Z","repository":{"id":80261860,"uuid":"103126932","full_name":"openGeeksLab/rnopentok","owner":"openGeeksLab","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-11T13:14:14.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T17:54:59.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openGeeksLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-11T11:20:34.000Z","updated_at":"2017-09-11T11:49:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ee5e890b-6e83-4ef1-b94f-d5e6902b1fcc","html_url":"https://github.com/openGeeksLab/rnopentok","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Frnopentok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Frnopentok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Frnopentok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openGeeksLab%2Frnopentok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openGeeksLab","download_url":"https://codeload.github.com/openGeeksLab/rnopentok/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240943146,"owners_count":19882354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T10:19:31.547Z","updated_at":"2025-02-26T22:24:16.331Z","avatar_url":"https://github.com/openGeeksLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HotBox\n![HOTBOX LOGO](http://i.imgur.com/495tedr.png)\n\nReact Native wrapper around [TokBox OpenTOK SDK](https://tokbox.com/).\n\n### iOS\n\n1. `yarn add https://github.com/mobileDevNativeCross/rnopentok.git` or inferiorly `npm install --save https://github.com/mobileDevNativeCross/rnopentok.git`\n2. You're going to want a bridging header:\n\n```\n#import \u003cReact/RCTBridgeModule.h\u003e\n#import \u003cReact/RCTEventEmitter.h\u003e\n#import \u003cReact/RCTViewManager.h\u003e\n```\n3. You will also want a Podfile:\n\n```\n# Uncomment the next line to define a global platform for your project\n# platform :ios, '9.0'\n\ntarget 'Example' do\n  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks\n\n  use_frameworks!\n\n  pod 'RxSwift'\n  pod 'OpenTok'\n\nend\n```\n\n## Usage\n\nSomething like: \n\n```\nimport {Session, PublisherView, SubscriberView} from 'rnopentok'\n\t\nvar session = new Session()\n\nsession.on('sessionDidConnect', () =\u003e console.log('connected'))\nsession.on(\"sessionDidDisconnect\", () =\u003e console.log('disconnected'))\nsession.on('publisherStreamCreated', () =\u003e console.log(\"PUBLISHER CREATED\"))\nsession.on('sessionStreamCreated', () =\u003e console.log('sessionStreamCreated'))\nsession.on('subscriberDidConnect', (streamId) =\u003e console.log(\"New subscriber\", streamId))\nsession.on(\"subscriberDidDisconnect\", (streamId) =\u003e console.log(\"Subscriber disconnected\", streamId))\nsession.on('sessionStreamDestroyed', (streamId) =\u003e console.log(\"Stream destroyed\", streamId))\n\nlet apiKey = ''\nlet sessionId = ''\nlet token = ''\n\nsession.createSession(apiKey, sessionId, token)\n```\n\n### Events\n\n```\n* sessionDidConnect \t\t\t\t(sessionId)\n* sessionDidDisconnect \t\t\t\t(sessionId)\n* sessionConnectionCreated \t\t\t(connectionId)\n* sessionConnectionDestroyed\t\t\t(connectionId)\n* sessionStreamCreated \t\t\t\t(streamId)\n* sessionStreamDidFailWithError \t\t(err)\n* sessionStreamDestroyed \t\t\t(streamId)\n* sessionReceivedSignal \t\t\t({type, connectionId, message})\n* publisherStreamCreated \t\t\t(streamId)\n* publisherStreamDidFailWithError \t\t(err)\n* publisherStreamDestroyed \t\t\t(streamId)\n* subscriberDidConnect \t\t\t\t(streamId)\n* subscriberDidFailWithError \t\t\t(streamId)\n* subscriberDidDisconnect \t\t\t(streamId)\n```\n\n### Methods\n\n```\nsession.createSession(apiKey, sessionId, token)\nsession.createPublisher() // You can manually create the publisher but by default it's created automatically\nsession.disconnectAllSessions()\n\t\n// Turn on/off video stream for given streamId (null for publisher)\nsession.requestVideoStream(streamId, on)\n\t\n// Turn on/off audio stream for given streamId (null for publisher)\nsession.requestAudioStream(streamId, on)\n\t\n// Flip publisher camera\nsession.requestCameraSwap(toBack) // toBack==true ==\u003e back camera\n\t\n//Send messages\nsession.sendMessage(type, message, connectionId)\nsession.broadcastMessage(type, message)\n\t\n//Subscribe to Stream\nsession.subscribe(streamId)\n\t\n//Subscribe to signals\nsession.on(event, handler)\n\t\n```\n\n### Views\n\n#### Publisher\n\n`\u003cPublisherView style={styles.viewStyle} /\u003e`\n\n### Subscriber\n\n`\u003cSubscriberView style={styles.viewStyle} streamId={streamId} /\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Frnopentok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengeekslab%2Frnopentok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengeekslab%2Frnopentok/lists"}