{ "id": "164968", "key": "TIMOB-24209", "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": "18154", "name": "Release 6.0.1", "archived": false, "released": true, "releaseDate": "2016-12-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-01-20T17:32:53.000+0000", "created": "2016-12-11T17:56:16.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Alloy", "WebView", "android", "qe-6.0.1" ], "versions": [], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-01-20T17:33:03.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "After upgrading to TiSDK 6.0.0 videos in a webview did not show any more. I have discussed the matter with Hans and have created this ticket with the findings.\r\n\r\nMy original code looks like this:\r\n\r\n*video.xml*\r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\n*video.js*\r\n\r\n{code}\r\nvar args = arguments[0] || {};\r\nconst html=\"\";\r\n\r\nif(args.title && args.url){\r\n\t$.title.text = args.title;\r\n\t$.player.html = require('utils/util').format(html, args.url);\r\n}\r\n{code}\r\n\r\nwhere the _format(..)_ method in _utils/util_ is a simple method:\r\n\r\n{code}\r\nfunction format(pattern, a1, a2, a3, a4, a5){\r\n\t// Replace 'place holders' like {1} with a1 etc.\r\n\tif(pattern){\r\n\t\treturn pattern.replace('{1}',a1 || '').replace('{2}',a2 || '').replace('{3}',a3 || '').replace('{4}',a4 || '').replace('{5}',a5 || '');\r\n\t}\r\n\treturn '';\r\n}\r\n{code}\r\n\r\n.... and I call the _video_ controller like this:\r\n\r\n*videos.js*\r\n\r\n{code}\r\nvar videos = [];\r\nvideos.push({title:'Introduktion til menu-funktionen', url:'https://player.vimeo.com/video/151036965'});\r\nvideos.push({title:'Sådan registrerer du en fisketur mens du fisker', url:'https://player.vimeo.com/video/151039720'});\r\nvideos.push({title:'Sådan indtaster du en overstået fisketur', url:'https://player.vimeo.com/video/151040599'});\r\nvideos.push({title:'Sådan får du overblik over dine fisketure og fangster via \"Min side\"', url:'https://player.vimeo.com/video/151041650'});\r\nvideos.push({title:'Sådan får du overblik over egne fisketure, fangster og statistik', url:'https://player.vimeo.com/video/151042851'});\r\nvideos.push({title:'Sådan redigerer du en fangst - hemmelig, pral og facebook', url:'https://player.vimeo.com/video/151043670'});\r\nvideos.push({title:'Find fredningsbælterne', url:'https://player.vimeo.com/video/194496467'});\r\n\r\nsetTimeout(function(){\r\n\t_.each(videos, function(v){\r\n\t $.videoList.add(Alloy.createController('video', v).getView());\r\n\t});\r\n}, 200);\r\n{code}\r\n\r\n... where videoList is inside a scrollview like this:\r\n\r\n*videos.xml*\r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nThat all worked fine up to TiSDK 5.5 - but upgrading to TiSDK 6.0.0 broke it. It still worked on iOS but on Android the webview was simply not loaded. The title was visible - but nothing after that (per video).\r\n\r\nAfter the discussion with Hans I first tried to do the webview in js-only code. That worked for Android - but for iOS I could not start the video. I tried to set the zIndex to 1000 and set touchEnabled to true (though it is default) on the webview - but still couldn't start the video by pressing on the \"play\" button. Nothing happened.\r\n\r\nSo I ended up implementing the previous model for iOS and the js-only for Android. Like this:\r\n\r\n*video.js*\r\n\r\n{code}\r\nvar args = arguments[0] || {};\r\nconst html=\"\";\r\n\r\nif(args.title && args.url){\r\n\t$.title.text = args.title;\r\n\t// APP.log.trace(\"Adding video: \" + args.title);\r\n\tif(OS_ANDROID){\r\n\t\tvar webView = Ti.UI.createWebView({\r\n\t\t html: require('utils/util').format(html,args.url),\r\n\t\t height:Ti.UI.SIZE,\r\n\t\t backgroundColor:'transparent'\r\n\t\t});\r\n\t\t$.row.add(webView);\r\n\t}else{\r\n\t\t$.player.html = require('utils/util').format(html, args.url);\r\n\t}\r\n}\r\n{code}\r\n\r\n*video.xml*\r\n\r\n{code}\r\n\r\n \r\n \t\r\n \r\n \r\n\r\n{code}\r\n\r\nAnd that seems to work as expected :-)", "attachment": [], "flagged": false, "summary": "Android: with link to video does not play after upgrade to TiSDK 6.0.0 (Regression)", "creator": { "name": "jda", "key": "jda", "displayName": "John Dalsgaard", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jda", "key": "jda", "displayName": "John Dalsgaard", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Appcelerator Command-Line Interface, version 6.0.0\r\nCopyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved.\r\n\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.12.1\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 16.0GB\r\n\r\nNode.js\r\n Node.js Version = 4.5.0\r\n npm Version = 2.15.9\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.8\r\n Core Package = 6.0.0\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.10\r\n node-appc Version = 0.2.31\r\n\r\nTitanium SDKs\r\n 6.0.0.GA\r\n Version = 6.0.0\r\n Install Location = /Users/jda/Library/Application Support/Titanium/mobilesdk/osx/6.0.0.GA\r\n Platforms = iphone, android, mobileweb\r\n git Hash = 1aa3df8\r\n git Timestamp = 11/13/2016 09:27\r\n node-appc Version = 0.2.39\r\n 5.5.1.GA\r\n Version = 5.5.1\r\n Install Location = /Users/jda/Library/Application Support/Titanium/mobilesdk/osx/5.5.1.GA\r\n Platforms = android, mobileweb, iphone\r\n git Hash = b18727f\r\n git Timestamp = 09/27/16 05:38\r\n node-appc Version = 0.2.36\r\n 5.5.0.GA\r\n Version = 5.5.0\r\n Install Location = /Users/jda/Library/Application Support/Titanium/mobilesdk/osx/5.5.0.GA\r\n Platforms = android, mobileweb, iphone\r\n git Hash = 44a2e3f\r\n git Timestamp = 09/13/16 12:38\r\n node-appc Version = 0.2.36\r\n \r\nMac OS X\r\n Command Line Tools = installed\r\n\r\nIntel® Hardware Accelerated Execution Manager (HAXM)\r\n Installed = yes\r\n Memory Limit = 4 GB\r\n\r\nJava Development Kit\r\n Version = 1.8.0_102\r\n Java Home = /Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home\r\n", "closedSprints": [ { "id": 770, "state": "closed", "name": "2016 Sprint 25 SDK", "startDate": "2016-12-03T01:53:07.491Z", "endDate": "2016-12-17T01:53:00.000Z", "completeDate": "2016-12-21T03:19:43.884Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "403140", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "As a side-note, I feel like this could be related to TIMOB-24208 (Android / WebView / Alloy / 6.0.0 regression).", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-11T18:10:03.000+0000", "updated": "2016-12-11T18:10:39.000+0000" }, { "id": "403159", "author": { "name": "jda", "key": "jda", "displayName": "John Dalsgaard", "active": true, "timeZone": "Europe/Berlin" }, "body": "Another observation: On Android 4.4.2 (device - a Samsung Galaxy S3 Neo) the video does not start on first press on the play button. I need to pause it and then press the start button again - and then it plays....\r\n\r\nThis is also new behaviour.", "updateAuthor": { "name": "jda", "key": "jda", "displayName": "John Dalsgaard", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-12-12T10:15:35.000+0000", "updated": "2016-12-12T10:15:35.000+0000" }, { "id": "403272", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/8681\r\n6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8682", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-12-13T16:06:29.000+0000", "updated": "2016-12-13T16:06:29.000+0000" }, { "id": "403445", "author": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, A webview with a video link now plays correctly.\r\nTested on:\r\n\r\n{noformat}\r\nmacOS Sierra 10.12.1\r\nNexus 5X (6.0.1)\r\nNexus 6p (7.0)\r\nandroid emulator (4.4.2, 6.0)\r\nTi SDK: 6.0.1.v20161214184817\r\nAppc NPM: 4.2.8\r\nApp CLI: 6.0.0\r\nNode v4.6.0\r\n{noformat}\r\n\r\n*Closing Ticket.*", "updateAuthor": { "name": "jlongton", "key": "jlongton", "displayName": "Josh Longton", "active": true, "timeZone": "Europe/London" }, "created": "2016-12-15T18:37:01.000+0000", "updated": "2016-12-15T18:37:01.000+0000" }, { "id": "404942", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to add version and to allow back port.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-20T17:15:06.000+0000", "updated": "2017-01-20T17:15:06.000+0000" }, { "id": "404945", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopened in error, closing.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-01-20T17:32:53.000+0000", "updated": "2017-01-20T17:32:53.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }