{ "id": "148925", "key": "TIMOB-19040", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-16T13:49:43.000+0000", "created": "2015-06-18T07:51:03.000+0000", "epic": { "id": 149396, "key": "TIMOB-19145", "name": "iOS: iOS 9 Updates", "summary": "iOS: iOS9 Updates", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "media", "movieplayer" ], "versions": [], "issuelinks": [ { "id": "53984", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "152587", "key": "TIMOB-20112", "fields": { "summary": "iOS: Fullscreen Video Pushing the NavBar upwards to the size of the status bar and remains there after exit Fullscreen", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "49066", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "149118", "key": "TIMOB-19070", "fields": { "summary": "iOS9: Support picture in picture", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "57713", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "173807", "key": "TIMOB-27184", "fields": { "summary": "Android: Add VideoPlayer \"scalingMode\" constants VIDEO_SCALING_RESIZE_*", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "57716", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "173808", "key": "TIMOB-27185", "fields": { "summary": "Windows: Add VideoPlayer \"scalingMode\" constants VIDEO_SCALING_RESIZE_*", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-06-26T06:59:09.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "MPMoviePlayerController is getting deprecated in iOS9. We are using this in TiMediaVideoPlayer, so we have to work on an alternative. Likely AVPlayerViewController.\r\n\r\nDeprecation details: https://developer.apple.com/library/prerelease/ios/releasenotes/General/iOS90APIDiffs/frameworks/MediaPlayer.html\r\n\r\nAVPlayer Reference: https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html#//apple_ref/doc/uid/TP40009530\r\n\r\nAVPlayerViewController Reference: https://developer.apple.com/library/prerelease/ios/documentation/AVFoundation/Reference/AVPlayerViewController_Class/index.html#//apple_ref/doc/uid/TP40014273\r\n", "attachment": [], "flagged": false, "summary": "iOS9: Replace MPMoviePlayerController in Ti.Media.VideoPlayer with AVPlayerViewController", "creator": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "375530", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (work in progress): https://github.com/appcelerator/titanium_mobile/pull/8194\r\n\r\nDemo:\r\n{code:javascript}\r\n/* -- Data Structure -- */\r\n\r\nvar dataStructure = [{\r\n\ttitle : \"Play video\",\r\n\taction : playVideo\r\n}, {\r\n\ttitle : \"Pause video\",\r\n\taction : pauseVideo\r\n}, {\r\n\ttitle : \"Stop video\",\r\n\taction : stopVideo\r\n}, {\r\n\ttitle : \"Change video source (local)\",\r\n\taction : changeLocalVideoSource\r\n}, {\r\n\ttitle : \"Change video source (remote)\",\r\n\taction : changeRemoteImageSource\r\n}, {\r\n\ttitle : \"Change background color\",\r\n\taction : changeBackgroundColor\r\n}, {\r\n\ttitle : \"Set volume to 50%\",\r\n\taction : decreaseVolume\r\n}, {\r\n\ttitle : \"Get playable duration\",\r\n\taction : getPlayableDuration\r\n}, {\r\n\ttitle : \"Get playback state\",\r\n\taction : getPlaybackState\r\n}, {\r\n\ttitle : \"Set full width\",\r\n\taction : setSizeFullWidth\r\n}, {\r\n\ttitle : \"Set width + height to 300 (animated)\",\r\n\taction : setSize\r\n}, {\r\n\ttitle : \"Is playing?\",\r\n\taction : getPlaying\r\n}, {\r\n\ttitle: \"Take screenshot at 5s\",\r\n\taction: takeScreenshot\r\n}, {\r\n\ttitle: \"Set initial playback time\",\r\n\taction: setInitialPlaybackTime\r\n}, {\r\n\ttitle: \"Set fullscreen\",\r\n\taction: setFullscreen\r\n}];\r\n\r\nvar counter = 0;\r\n\r\n/* -- UI -- */\r\n\r\nvar isiOS = (Ti.Platform.osname == \"ipad\" || Ti.Platform.osname == \"iphone\");\r\n\r\nvar win = Titanium.UI.createWindow({\r\n\ttitle : 'Video Player Demo',\r\n\tbackgroundColor : '#fff',\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar nav = isiOS ? Ti.UI.iOS.createNavigationWindow({\r\n\twindow : win\r\n}) : null;\r\n\r\nvar header = Ti.UI.createView({\r\n\theight : 350,\r\n\tbackgroundColor : \"#eee\"\r\n});\r\n\r\nvar content = Ti.UI.createScrollView({\r\n\tlayout : \"horizontal\",\r\n\tscrollType : \"vertical\",\r\n\tcontentWidth : Ti.Platform.displayCaps.platformWidth\r\n});\r\n\r\nvar videoPlayer = Titanium.Media.createVideoPlayer({\r\n\tautoplay : false,\r\n\turl : 'movie.mp4',\r\n\tinitialPlaybackTime: 1000,\r\n\tpictureInPictureEnabled : true, // Only supported on iOS9 & iPad Air or later!\r\n\tscalingMode : Titanium.Media.VIDEO_SCALING_MODE_RESIZE_ASPECT\r\n});\r\n\r\nfor (var i = 0; i < dataStructure.length; i++) {\r\n\tvar btn = Ti.UI.createButton({\r\n\t\ttop : '3.5%',\r\n\t\tleft : '7%',\r\n\t\theight : 60,\r\n\t\twidth : '40%',\r\n\t\ttintColor : '#b50d00',\r\n\t\tbackgroundColor : '#e0e0e0',\r\n\t\ttitle : dataStructure[i].title\r\n\t});\r\n\r\n\tbtn.addEventListener(\"click\", dataStructure[i].action);\r\n\r\n\tcontent.add(btn);\r\n}\r\n\r\nheader.add(videoPlayer);\r\nwin.add(header);\r\nwin.add(content);\r\n\r\nif (nav) {\r\n\tnav.open();\r\n} else {\r\n\twin.open();\r\n}\r\n\r\n/* -- Events -- */\r\n\r\nvideoPlayer.addEventListener('complete', function(e) {\r\n\tTi.API.info('complete ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('durationavailable', function(e) {\r\n\tTi.API.info('durationavailable ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('error', function(e) {\r\n\tTi.API.info('error ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('load', function(e) {\r\n\tTi.API.info('load ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('playbackstate', function(e) {\r\n\tTi.API.info('playbackstate ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('playing', function(e) {\r\n\tTi.API.info('playing ' + JSON.stringify(e));\r\n});\r\n\r\nvideoPlayer.addEventListener('preload', function(e) {\r\n\tTi.API.info('preload ' + JSON.stringify(e));\r\n});\r\n\r\n/* -- Actions -- */\r\n\r\nfunction playVideo() {\r\n\tvideoPlayer.play();\r\n}\r\n\r\nfunction pauseVideo() {\r\n\tvideoPlayer.pause();\r\n}\r\n\r\nfunction stopVideo() {\r\n\tvideoPlayer.stop();\r\n}\r\n\r\nfunction changeRemoteImageSource() {\r\n\tvideoPlayer.url = 'http://techslides.com/demos/sample-videos/small.mp4';\r\n\tvideoPlayer.play();\r\n}\r\n\r\nfunction changeBackgroundColor() {\r\n\tvar colors = [\"#f00\", \"#ff0\", \"#0ff\", \"#00f\", \"#0f0\", \"#f0f\"];\r\n\r\n\tvideoPlayer.setBackgroundColor(colors[Math.floor(Math.random() * colors.length)]);\r\n\tcounter = (counter == (colors.length - 1)) ? 0 : counter + 1;\r\n}\r\n\r\nfunction decreaseVolume() {\r\n\tvideoPlayer.setVolume(0.5);\r\n}\r\n\r\nfunction changeLocalVideoSource() {\r\n\tvideoPlayer.url = 'another.mp4';\r\n\tvideoPlayer.play();\r\n}\r\n\r\nfunction getPlayableDuration() {\r\n\talert(videoPlayer.playableDuration);\r\n}\r\n\r\nfunction getPlaybackState() {\r\n\talert(videoPlayer.playbackState);\r\n}\r\n\r\nfunction setSizeFullWidth() {\r\n\tvideoPlayer.setWidth('100%');\r\n}\r\n\r\nfunction setSize() {\r\n\tvideoPlayer.animate({\r\n\t\twidth : 300,\r\n\t\theight : 300\r\n\t})\r\n}\r\n\r\nfunction getPlaying() {\r\n\talert(videoPlayer.playing);\r\n}\r\n\r\nfunction takeScreenshot() {\r\n\tvar blob = videoPlayer.thumbnailImageAtTime({\r\n\t\ttime: 5 // In seconds\r\n\t});\r\n\tvar _win = Ti.UI.createWindow({backgroundColor: \"#fff\"});\r\n\tvar image = Ti.UI.createImageView({image: blob});\r\n\timage.addEventListener(\"click\", function() {\r\n\t\t_win.close();\r\n\t})\r\n\t_win.add(image);\r\n\t_win.open();\r\n}\r\n\r\nfunction setInitialPlaybackTime() {\r\n\tvideoPlayer.setInitialPlaybackTime(3000); // In milliseconds\r\n}\r\n\r\nfunction setFullscreen() {\r\n\tvideoPlayer.setFullscreen(true); // In milliseconds\r\n}\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-30T20:56:23.000+0000", "updated": "2016-08-07T20:44:31.000+0000" }, { "id": "403923", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8721", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-30T07:54:42.000+0000", "updated": "2016-12-30T07:54:42.000+0000" }, { "id": "403928", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Moving to 7.0.0 because of the breaking changes discussed on Github.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-30T12:15:59.000+0000", "updated": "2016-12-30T12:15:59.000+0000" }, { "id": "430582", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test Case (modified above demo)-\r\n\r\n{code:java}\r\nvar dataStructure = [{\r\n title : \"Play video\",\r\n action : playVideo\r\n}, {\r\n title : \"Pause video\",\r\n action : pauseVideo\r\n}, {\r\n title : \"Stop video\",\r\n action : stopVideo\r\n}, {\r\n title : \"Change video source (local)\",\r\n action : changeLocalVideoSource\r\n}, {\r\n title : \"Change video source (remote)\",\r\n action : changeRemoteImageSource\r\n}, {\r\n title : \"Change background color\",\r\n action : changeBackgroundColor\r\n}, {\r\n title : \"Set volume to 50%\",\r\n action : decreaseVolume\r\n}, {\r\n title : \"Get playable duration\",\r\n action : getPlayableDuration\r\n}, {\r\n title : \"Get playback state\",\r\n action : getPlaybackState\r\n}, {\r\n title : \"Set full width\",\r\n action : setSizeFullWidth\r\n}, {\r\n title : \"Set width + height to 300 (animated)\",\r\n action : setSize\r\n}, {\r\n title : \"Is playing?\",\r\n action : getPlaying\r\n}, {\r\n title: \"Take screenshot at 5s\",\r\n action: takeScreenshot\r\n}, {\r\n title: \"Take multiple screenshots\",\r\n action: captureSeriesOfImages\r\n}, {\r\n title: \"Set initial playback time\",\r\n action: setInitialPlaybackTime\r\n}, {\r\n title: \"Is airPlay allowed?\",\r\n action: getAllowsAirPlay\r\n}, {\r\n title: \"repeatMode ?\",\r\n action: getRepeatMode\r\n}];\r\n \r\n \r\nvar counter = 0;\r\n \r\n/* -- UI -- */\r\n \r\nvar isiOS = (Ti.Platform.osname == \"ipad\" || Ti.Platform.osname == \"iphone\");\r\n \r\nvar win = Titanium.UI.createWindow({\r\n title : 'Video Player Demo',\r\n backgroundColor : '#fff',\r\n layout : 'vertical'\r\n});\r\n \r\nvar nav = isiOS ? Ti.UI.iOS.createNavigationWindow({\r\n window : win\r\n}) : null;\r\n \r\nvar header = Ti.UI.createView({\r\n height : 350,\r\n backgroundColor : \"#eee\"\r\n});\r\n \r\nvar content = Ti.UI.createScrollView({\r\n layout : \"horizontal\",\r\n scrollType : \"vertical\",\r\n contentWidth : Ti.Platform.displayCaps.platformWidth,\r\n contentHeight : 1000\r\n});\r\n \r\nvar videoPlayer = Titanium.Media.createVideoPlayer({\r\n autoplay : true,\r\n url : 'http://techslides.com/demos/sample-videos/small.mp4',//'movie.mp4',\r\n initialPlaybackTime: 1000,\r\n showsControls:true,\r\n pictureInPictureEnabled : true, // Only supported on iOS9 & iPad Air or later!\r\n scalingMode : Titanium.Media.VIDEO_SCALING_MODE_RESIZE_ASPECT,\r\n repeatMode : Titanium.Media.VIDEO_REPEAT_MODE_NONE\r\n});\r\n \r\nfor (var i = 0; i < dataStructure.length; i++) {\r\n var btn = Ti.UI.createButton({\r\n top : '3.5%',\r\n left : '7%',\r\n height : 60,\r\n width : '40%',\r\n tintColor : '#b50d00',\r\n backgroundColor : '#e0e0e0',\r\n title : dataStructure[i].title\r\n });\r\n \r\n btn.addEventListener(\"click\", dataStructure[i].action);\r\n \r\n content.add(btn);\r\n}\r\n \r\nheader.add(videoPlayer);\r\nwin.add(header);\r\nwin.add(content);\r\n \r\nif (nav) {\r\n nav.open();\r\n} else {\r\n win.open();\r\n}\r\n \r\n/* -- Events -- */\r\n \r\nvideoPlayer.addEventListener('complete', function(e) {\r\n Ti.API.info('complete ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('durationavailable', function(e) {\r\n Ti.API.info('durationavailable ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('error', function(e) {\r\n Ti.API.info('error ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('load', function(e) {\r\n Ti.API.info('load ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('playbackstate', function(e) {\r\n Ti.API.info('playbackstate ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('playing', function(e) {\r\n Ti.API.info('playing ' + JSON.stringify(e));\r\n});\r\n \r\nvideoPlayer.addEventListener('preload', function(e) {\r\n Ti.API.info('preload ' + JSON.stringify(e));\r\n});\r\n \r\n/* -- Actions -- */\r\n \r\nfunction playVideo() {\r\n videoPlayer.play();\r\n}\r\n \r\nfunction pauseVideo() {\r\n videoPlayer.pause();\r\n}\r\n \r\nfunction stopVideo() {\r\n videoPlayer.stop();\r\n}\r\n \r\nfunction changeRemoteImageSource() {\r\n videoPlayer.url = 'http://techslides.com/demos/sample-videos/small.mp4';\r\n videoPlayer.play();\r\n}\r\n \r\nfunction changeBackgroundColor() {\r\n var colors = [\"#f00\", \"#ff0\", \"#0ff\", \"#00f\", \"#0f0\", \"#f0f\"];\r\n \r\n videoPlayer.setBackgroundColor(colors[Math.floor(Math.random() * colors.length)]);\r\n counter = (counter == (colors.length - 1)) ? 0 : counter + 1;\r\n}\r\n \r\nfunction decreaseVolume() {\r\n videoPlayer.setVolume(0.5);\r\n}\r\n \r\nfunction changeLocalVideoSource() {\r\n videoPlayer.url = 'another.mp4';\r\n videoPlayer.play();\r\n}\r\n \r\nfunction getPlayableDuration() {\r\n alert(videoPlayer.playableDuration);\r\n}\r\n \r\nfunction getAllowsAirPlay() {\r\n alert(videoPlayer.allowsAirPlay);\r\n}\r\n \r\n function getShowControls() {\r\n alert(videoPlayer.showsControls);\r\n}\r\n \r\nfunction getPlaybackState() {\r\n alert(videoPlayer.playbackState);\r\n}\r\nfunction getRepeatMode() {\r\n alert(videoPlayer.repeatMode); \r\n}\r\n \r\nfunction setSizeFullWidth() {\r\n videoPlayer.setWidth('100%');\r\n}\r\n \r\nfunction setSize() {\r\n videoPlayer.animate({\r\n width : 300,\r\n height : 300\r\n })\r\n}\r\n \r\nfunction getPlaying() {\r\n alert(videoPlayer.playing);\r\n}\r\n \r\nfunction takeScreenshot() {\r\n var blob = videoPlayer.thumbnailImageAtTime({\r\n time: 5 // In seconds\r\n });\r\n var _win = Ti.UI.createWindow({backgroundColor: \"#fff\"});\r\n var image = Ti.UI.createImageView({image: blob});\r\n image.addEventListener(\"click\", function() {\r\n _win.close();\r\n })\r\n _win.add(image);\r\n _win.open();\r\n}\r\n \r\nfunction captureSeriesOfImages() {\r\n var _win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\",\r\n layout : 'vertical'\r\n });\r\n _win.open();\r\n \r\n videoPlayer.requestThumbnailImagesAtTimes([1, 2, 4], Ti.Media.VIDEO_TIME_OPTION_EXACT, function(e){\r\n Ti.API.info('Captured screen shot at time ' + e.time);\r\n \r\n var image = Ti.UI.createImageView({\r\n top:20,\r\n height : '100',\r\n image: e.image});\r\n image.addEventListener(\"click\", function() {\r\n _win.close();\r\n })\r\n _win.add(image);\r\n });\r\n}\r\n \r\nfunction setInitialPlaybackTime() {\r\n videoPlayer.setInitialPlaybackTime(3000); // In milliseconds\r\n}\r\n{code}", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-14T09:16:18.000+0000", "updated": "2017-11-15T10:06:10.000+0000" }, { "id": "430649", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "New PR - https://github.com/appcelerator/titanium_mobile/pull/9600", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T04:08:12.000+0000", "updated": "2017-11-15T04:08:12.000+0000" }, { "id": "430876", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified in SDK build 7.0.0.v20171116132144", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T23:46:03.000+0000", "updated": "2017-11-16T23:46:03.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }