Commit graph

37 commits

Author SHA1 Message Date
Richard Davey
2bc9c73838 The Video.playing property didn't check to see if the Video existed, and would throw the error Uncaught TypeError: Cannot read property 'paused' of null if you called it after destroying the video (thanks @Tetley #2740) 2016-09-26 23:35:41 +01:00
Richard Davey
0692bf01b5 If you called Video.changeSource, and then immediately called Video.play after it, it would fire the onComplete event twice (thanks @jaraiza #2543) 2016-09-26 23:28:41 +01:00
Richard Davey
c4d7870a31 * PIXI.Texture.fromImage, PIXI.BaseTexture.fromImage and PIXI.Sprite.fromImage have all been removed. They should never have actually been used, as they bypass the Phaser Loader, and don't factor in CORs or any other advanced loader settings.
* The PIXI.BaseTexture.imageUrl property has been removed, as it was never actually populated.
* The PIXI.BaseTexture._UID property has been removed, as it was never actually used internally.
* All references to PIXI.BaseTextureCache have been removed (primarily from BaseTexture.destroy and Texture.destroy), as the BaseTextureCache was never used internally by Phaser, or by our custom version of Pixi.
* PIXI.TextureCache has been removed. It was only ever used by the __default and __missing images that Phaser generates on start-up. It wasn't used internally by Phaser anywhere else, and the only references Pixi has to it have all been removed. If you need it in your own game, please refactor it to avoid it, or re-create the object on the PIXI global object.
* Canvases created by `BaseTexture.fromCanvas` no longer have the `_pixiId` property attached to them, as this was never used internally by Phaser or Pixi.
* PIXI.BaseTexture.updateSourceImage is now deprecated. Please use `Sprite.loadTexture` instead.
* The property PIXI.BaseTextureCacheIdGenerator has been removed, as it is no longer used internally by Phaser or Pixi.
* PIXI.Texture.addTextureToCache has been removed. The PIXI Texture Cache was never actually used by Phaser, and was leading to complications internally.
* PIXI.Texture.removeTextureFromCache has been removed. The PIXI Texture Cache was never actually used by Phaser, and was leading to complications internally.
* PIXI.Texture.fromFrame and PIXI.Sprite.fromFrame have been removed. They relied on the PIXI Texture Cache, which was never actually used by Phaser, and was never used internally by Pixi either.
* The property PIXI.TextureCacheIdGenerator has been removed, as it was not used internally.
* The property PIXI.FrameCache has been removed, as it was not used internally.
2016-07-06 21:47:27 +01:00
photonstorm
21b5492e98 Video.onComplete wouldn't fire on iOS if the user hit the 'Done' button before the video had finished playing. It now uses the webkitendfullscreen event to detect this, and dispatches the onComplete signal should that event fire (thanks @kelu-smiley #2498) 2016-06-02 15:26:11 +01:00
Richard Davey
71056ccb69 Merge pull request #2371 from stoneman1/dev
Fixed video for future
2016-04-06 01:08:22 +01:00
photonstorm
f40cfbe2ae 2015 - 2016. 2016-04-04 22:16:16 +01:00
Stoneman1
ee335fe466 Fixed backwards compatibility issue. 2016-03-02 13:28:44 +02:00
Stoneman1
5bdc1c05b4 MediaStream.stop() deprecated. Using MediaStreamTrack.stop() instead. 2016-03-02 12:34:28 +02:00
Richard Davey
34aff350eb The Video game object used an anonymous bound function for both the 'ended' and 'playing' event listeners, meaning that they were never removed properly (thanks @ramalhovfc #2303) 2016-02-02 00:18:50 +00:00
photonstorm
1c169ef571 Video jsdoc fixes. 2015-11-02 11:51:15 +00:00
photonstorm
176289f514 Video.stop now removes the 'playing' event listener, which stop Videos set to loop from throwing errors after being destroyed. 2015-08-18 16:04:10 +01:00
photonstorm
1fed360659 VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop. 2015-08-04 15:48:43 +01:00
photonstorm
858ad51610 Phaser 2.4 release. 2015-07-22 15:31:30 +01:00
photonstorm
f15fe6706c All undefined argument checks were changed from if (typeof x === 'undefined') to if (x === undefined) removing the typeof check and saving some bytes across the codebase in the process. 2015-07-22 10:37:15 +01:00
photonstorm
70cf7a32bc Fixed jshint errors. 2015-06-13 02:31:21 +01:00
photonstorm
f216313582 jsdoc and debug removal. 2015-06-12 19:21:06 +01:00
photonstorm
10a3df1ef5 Set the Video baseTexture to __default until the stream starts. 2015-06-10 14:21:58 +01:00
photonstorm
5458097006 Renamed createVideoStream to startMediaStream.
Refactored Video constructor significantly - you can no longer create a webcam stream from the constructor, as it doesn't give you time to respond to onAccess and onError signals in Firefox. Instead call startMediaStream directly having set-up your signal listeners first.

startMediaStream now has a chance to dispatch the onError signal if the webcam has been blocked entirely by the browser (auto-block or remembered block). autoPlay attribute removed to stop Firefox throwing a "Invalid URI. Load of media resource failed" error.

Tidied up Video.destroy to properly remove video element from the DOM.
2015-06-10 00:59:24 +01:00
photonstorm
f78a4cb337 jshint fixes. 2015-05-15 01:35:20 +01:00
photonstorm
f725ac48ae Removed all the debug information. 2015-05-15 01:27:42 +01:00
photonstorm
f2e2039009 Invalidate the texture while we wait for the new one to load (crashes IE11 otherwise) 2015-05-15 01:17:44 +01:00
photonstorm
ce27da362b Stacks of fixes to the video stream support to get it working in Firefox. 2015-05-14 23:23:38 +01:00
photonstorm
aabeccbdac Working but needs refining. 2015-05-14 19:10:36 +01:00
photonstorm
63887faffe Loads of changes to deal with invalid textures and videos pending playback (i.e. Firefox) 2015-05-14 16:52:09 +01:00
photonstorm
e3b8fe3401 Proper setFrame call. 2015-05-07 02:45:33 +01:00
photonstorm
303929a3ce Added Video.snapshot and Video.grab support. 2015-05-06 16:47:46 +01:00
photonstorm
7cd89eedd6 jshint fixes. 2015-05-06 08:13:55 +01:00
photonstorm
7f89a3de60 Fixed video event. 2015-05-06 07:57:52 +01:00
photonstorm
d14d9f4f64 Added onAccess and onError signals and tidied up the stream handling. 2015-05-06 07:25:34 +01:00
photonstorm
a24a22742a Enabled Stream stopping. 2015-05-06 06:11:09 +01:00
photonstorm
37304c7cc7 Added Video.createVideoStream support. 2015-05-06 06:06:02 +01:00
photonstorm
535b56bc4a Got changeSource working properly on iOS and tidied up lots of docs. 2015-05-06 01:12:02 +01:00
photonstorm
9a563f20b9 Updated video locked status. 2015-05-05 17:03:39 +01:00
photonstorm
0cde8f874d Mobile touch lock support done. 2015-05-05 16:25:51 +01:00
photonstorm
2e2d1c6bc2 Lots of updates to the Phaser.Video object. 2015-05-05 14:00:59 +01:00
photonstorm
8a9e0c266a Added currentTime and duration getters. 2015-05-04 03:00:22 +01:00
photonstorm
c1ab5a3345 The first pass at the new Phaser.Video object. 2015-05-03 13:53:03 +01:00