opentok-camera-filters
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "opentok-camera-filters", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Streaming from a Canvas with Filters to an OpenTok Session", | ||
@@ -5,0 +5,0 @@ "main": "src/filter.js", |
@@ -50,3 +50,5 @@ const mockGetUserMedia = require('./mock-get-user-media'); | ||
// Stop running the filter | ||
selectedFilter.stop(); | ||
if (selectedFilter) { | ||
selectedFilter.stop(); | ||
} | ||
}); | ||
@@ -53,0 +55,0 @@ }, |
@@ -6,3 +6,2 @@ module.exports = function filterTask(videoElement, canvas, selectedFilter) { | ||
let stopped = false; | ||
let myId = Math.random() * 1000; | ||
@@ -26,3 +25,2 @@ // Draws a frame on the specified canvas after applying the selected filter every | ||
if (!stopped) { | ||
console.log(`requestAnimationFrame ${myId}`); | ||
requestAnimationFrame(drawFrame); | ||
@@ -29,0 +27,0 @@ } else { |
@@ -68,5 +68,4 @@ /* global describe it expect OT beforeEach SESSION_ID TOKEN API_KEY jasmine spyOn */ | ||
expect(pubErr).toBeFalsy(); | ||
publisher.on('destroyed', done); | ||
session.disconnect(); | ||
publisher.destroy(); | ||
done(); | ||
}); | ||
@@ -73,0 +72,0 @@ filter.setPublisher(publisher); |
Sorry, the diff of this file is not supported yet
9421894
5922