Socket
Socket
Sign inDemoInstall

opentok-angular

Package Overview
Dependencies
2
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.2.2

2

bower.json
{
"name": "opentok-angular",
"main": "opentok-angular.js",
"version": "1.2.1",
"version": "1.2.2",
"homepage": "https://github.com/aullman/OpenTok-Angular",

@@ -6,0 +6,0 @@ "authors": [

@@ -10,2 +10,2 @@ /*!

**/
if(!window.OT)throw new Error("You must include the OT library before the OT_Angular library");var ng;ng="undefined"==typeof angular&&"undefined"!=typeof require?require("angular"):angular;var initLayoutContainer;initLayoutContainer=window.hasOwnProperty("initLayoutContainer")||"undefined"==typeof require?window.initLayoutContainer:require("opentok-layout-js").initLayoutContainer,ng.module("opentok",[]).factory("OT",function(){return OT}).factory("OTSession",["OT","$rootScope",function(e,n){var i={streams:[],connections:[],publishers:[],init:function(t,o,s,r){this.session=e.initSession(t,o),i.session.on({sessionConnected:function(){i.publishers.forEach(function(e){i.session.publish(e)})},streamCreated:function(e){n.$apply(function(){i.streams.push(e.stream)})},streamDestroyed:function(e){n.$apply(function(){i.streams.splice(i.streams.indexOf(e.stream),1)})},sessionDisconnected:function(){n.$apply(function(){i.streams.splice(0,i.streams.length),i.connections.splice(0,i.connections.length)})},connectionCreated:function(e){n.$apply(function(){i.connections.push(e.connection)})},connectionDestroyed:function(e){n.$apply(function(){i.connections.splice(i.connections.indexOf(e.connection),1)})}}),this.session.connect(s,function(e){r&&r(e,i.session)}),this.trigger("init")},addPublisher:function(e){this.publishers.push(e),this.trigger("otPublisherAdded"),n.$apply()}};return e.$.eventing(i),i}]).directive("otLayout",["$window","$parse","OT","OTSession",function(e,n,i,t){return{restrict:"E",link:function(i,o,s){var r=n(s.props)(),c=initLayoutContainer(o[0],r),u=function(){c.layout(),i.$emit("otLayoutComplete")};i.$watch(function(){return o.children().length},u),e.addEventListener("resize",u),i.$on("otLayout",u);var a=function(){t.session.on("streamPropertyChanged",function(e){"videoDimensions"===e.changedProperty&&u()})};t.session?a():t.on("init",a)}}}]).directive("otPublisher",["OTSession",function(e){return{restrict:"E",scope:{props:"&"},link:function(n,i,t){var o=n.props()||{};o.width=o.width?o.width:ng.element(i).width(),o.height=o.height?o.height:ng.element(i).height();var s=ng.element(i).children();n.publisher=OT.initPublisher(t.apikey||e.session.apiKey,i[0],o,function(e){e&&n.$emit("otPublisherError",e,n.publisher)}),ng.element(i).append(s),n.publisher.on({accessDenied:function(){n.$emit("otAccessDenied")},accessDialogOpened:function(){n.$emit("otAccessDialogOpened")},accessDialogClosed:function(){n.$emit("otAccessDialogClosed")},accessAllowed:function(){ng.element(i).addClass("allowed"),n.$emit("otAccessAllowed")},loaded:function(){n.$emit("otLayout")},streamCreated:function(){n.$emit("otStreamCreated")},streamDestroyed:function(){n.$emit("otStreamDestroyed")}}),n.$on("$destroy",function(){e.session?e.session.unpublish(n.publisher):n.publisher.destroy(),e.publishers=e.publishers.filter(function(e){return e!==n.publisher}),n.publisher=null}),e.session&&(e.session.connected||e.session.isConnected&&e.session.isConnected())&&e.session.publish(n.publisher,function(e){e&&n.$emit("otPublisherError",e,n.publisher)}),e.addPublisher(n.publisher)}}}]).directive("otSubscriber",["OTSession",function(e){return{restrict:"E",scope:{stream:"=",props:"&"},link:function(n,i){var t=n.stream,o=n.props()||{};o.width=o.width?o.width:ng.element(i).width(),o.height=o.height?o.height:ng.element(i).height();var s=ng.element(i).children(),r=e.session.subscribe(t,i[0],o,function(e){e&&n.$emit("otSubscriberError",e,r)});r.on("loaded",function(){n.$emit("otLayout")}),ng.element(i).append(s),n.$on("$destroy",function(){e.session.unsubscribe(r)})}}}]);
if(!window.OT)throw new Error("You must include the OT library before the OT_Angular library");var ng;ng="undefined"==typeof angular&&"undefined"!=typeof require?require("angular"):angular;var initLayoutContainer;initLayoutContainer=window.hasOwnProperty("initLayoutContainer")||"undefined"==typeof require?window.initLayoutContainer:require("opentok-layout-js").initLayoutContainer,ng.module("opentok",[]).factory("OT",function(){return OT}).factory("OTSession",["OT","$rootScope",function(e,n){var i={streams:[],connections:[],publishers:[],init:function(t,o,s,r){this.session=e.initSession(t,o),i.session.on({sessionConnected:function(){i.publishers.forEach(function(e){i.session.publish(e)})},streamCreated:function(e){n.$apply(function(){i.streams.push(e.stream)})},streamDestroyed:function(e){n.$apply(function(){i.streams.splice(i.streams.indexOf(e.stream),1)})},sessionDisconnected:function(){n.$apply(function(){i.streams.splice(0,i.streams.length),i.connections.splice(0,i.connections.length)})},connectionCreated:function(e){n.$apply(function(){i.connections.push(e.connection)})},connectionDestroyed:function(e){n.$apply(function(){i.connections.splice(i.connections.indexOf(e.connection),1)})}}),this.session.connect(s,function(e){r&&r(e,i.session)}),this.trigger("init")},addPublisher:function(e){this.publishers.push(e),this.trigger("otPublisherAdded")}};return e.$.eventing(i),i}]).directive("otLayout",["$window","$parse","OT","OTSession",function(e,n,i,t){return{restrict:"E",link:function(i,o,s){var r=n(s.props)(),c=initLayoutContainer(o[0],r),u=function(){c.layout(),i.$emit("otLayoutComplete")};i.$watch(function(){return o.children().length},u),e.addEventListener("resize",u),i.$on("otLayout",u);var a=function(){t.session.on("streamPropertyChanged",function(e){"videoDimensions"===e.changedProperty&&u()})};t.session?a():t.on("init",a)}}}]).directive("otPublisher",["OTSession",function(e){return{restrict:"E",scope:{props:"&"},link:function(n,i,t){var o=n.props()||{};o.width=o.width?o.width:ng.element(i).width(),o.height=o.height?o.height:ng.element(i).height();var s=ng.element(i).children();n.publisher=OT.initPublisher(t.apikey||e.session.apiKey,i[0],o,function(e){e&&n.$emit("otPublisherError",e,n.publisher)}),ng.element(i).append(s),n.publisher.on({accessDenied:function(){n.$emit("otAccessDenied")},accessDialogOpened:function(){n.$emit("otAccessDialogOpened")},accessDialogClosed:function(){n.$emit("otAccessDialogClosed")},accessAllowed:function(){ng.element(i).addClass("allowed"),n.$emit("otAccessAllowed")},loaded:function(){n.$emit("otLayout")},streamCreated:function(){n.$emit("otStreamCreated")},streamDestroyed:function(){n.$emit("otStreamDestroyed")}}),n.$on("$destroy",function(){e.session?e.session.unpublish(n.publisher):n.publisher.destroy(),e.publishers=e.publishers.filter(function(e){return e!==n.publisher}),n.publisher=null}),e.session&&(e.session.connected||e.session.isConnected&&e.session.isConnected())&&e.session.publish(n.publisher,function(e){e&&n.$emit("otPublisherError",e,n.publisher)}),e.addPublisher(n.publisher)}}}]).directive("otSubscriber",["OTSession",function(e){return{restrict:"E",scope:{stream:"=",props:"&"},link:function(n,i){var t=n.stream,o=n.props()||{};o.width=o.width?o.width:ng.element(i).width(),o.height=o.height?o.height:ng.element(i).height();var s=ng.element(i).children(),r=e.session.subscribe(t,i[0],o,function(e){e&&n.$emit("otSubscriberError",e,r)});r.on("loaded",function(){n.$emit("otLayout")}),ng.element(i).append(s),n.$on("$destroy",function(){e.session.unsubscribe(r)})}}}]);
{
"name": "opentok-angular",
"version": "1.2.1",
"version": "1.2.2",
"description": "Angular module for OpenTok",

@@ -5,0 +5,0 @@ "main": "opentok-angular.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc