{ "id": "173040", "key": "TIMOB-26848", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "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": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-04-23T21:38:52.000+0000", "created": "2019-02-22T03:13:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "engArch", "parity", "url", "webview" ], "versions": [ { "id": "19275", "description": "Patch release for 6.0.x regressions or important fixes", "name": "Release 6.0.3", "archived": false, "released": true, "releaseDate": "2017-03-22" } ], "issuelinks": [ { "id": "57165", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "inwardIssue": { "id": "173047", "key": "TIMOB-26855", "fields": { "summary": "Windows: Add \"baseURL\" support to WebView.setHtml()", "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": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "57158", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "169788", "key": "AC-5198", "fields": { "summary": "baseUrl not working: Android Marshmallow and Oreo ", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-04-23T21:38:52.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": "*Summary:*\r\nTitanium currently documents that the {{WebView.setHtml()}} method supports a 2nd argument on Android and iOS which can provide a \"baseURL\" setting. Android used to support this, but it was inadvertently removed in Titanium 6.0.3. This feature should be re-added since it's needed by \"iframes\" to indicate which URL an iframe's embedded paths are relative to.\r\n\r\nFor example, a YouTube video embedded within an iframe will not play on Android or iOS unless a \"baseURL\" of \"https://www.youtube.com\" is provided.\r\n\r\n*Steps to reproduce:*\r\n# Build and run the below code on Android.\r\n# Tap on the video to attempt to play it.\r\n# Notice that the video won't play. Instead it reads \"Video Unavailable\".\r\n# Build and run on iOS.\r\n# Tap on the video play it.\r\n# Notice that the video plays fine. _(This is because the \"baseURL\" is being used.)_\r\n\r\n{code:javascript}\r\nvar htmlText =\r\n\t\t'' +\r\n\t\t'' +\r\n\t\t'\t
' +\r\n\t\t'\t\t' +\r\n\t\t'\t' +\r\n\t\t'';\r\n\r\nvar window = Ti.UI.createWindow();\r\nvar webView = Ti.UI.createWebView();\r\n//webView.html = htmlText;\r\nwebView.setHtml(htmlText, { baseURL: \"https://www.youtube.com\" });\r\nwindow.add(webView);\r\nwindow.open();\r\n{code}\r\n\r\n*Work-Around:*\r\nThe \"baseURL\" is not needed if the webpage was loaded from the Internet (ie: the \"url\" property). That is, \"baseURL\" is only applicable when loading HTML from string. So, hosting the webpage on your own web server will work-around this problem.\r\n", "attachment": [], "flagged": false, "summary": "Android: Re-add \"baseURL\" support to WebView.setHtml() that was removed in 6.0.3", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1123, "state": "closed", "name": "2019 Sprint 7", "startDate": "2019-03-18T17:27:25.993Z", "endDate": "2019-03-30T17:27:00.000Z", "completeDate": "2019-03-29T18:02:37.441Z", "originBoardId": 114 }, { "id": 1124, "state": "closed", "name": "2019 Sprint 8", "startDate": "2019-03-31T18:03:00.000Z", "endDate": "2019-04-12T18:03:00.000Z", "completeDate": "2019-04-12T19:04:50.175Z", "originBoardId": 114 }, { "id": 1128, "state": "closed", "name": "2019 Sprint 9", "startDate": "2019-04-14T19:05:00.000Z", "endDate": "2019-04-26T19:05:00.000Z", "completeDate": "2019-04-26T22:05:13.933Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "447071", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/10795", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-03-22T03:40:11.000+0000", "updated": "2019-03-22T03:40:11.000+0000" }, { "id": "447570", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-09T22:22:42.000+0000", "updated": "2019-04-09T22:22:42.000+0000" }, { "id": "447717", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-04-16T17:42:03.000+0000", "updated": "2019-04-16T17:42:03.000+0000" }, { "id": "447921", "author": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on SDK 8.1.0.v20190423074844.Video plays as expected. Closing .\r\n{code}\r\n Name = Mac OS X\r\n Version = 10.13.6\r\n Architecture = 64bit\r\nNode.js\r\n Node.js Version = 8.9.1\r\n npm Version = 5.5.1\r\nTitanium CLI\r\n CLI Version = 5.1.1\r\nAPPC CLI =7.0.11-70X.1\r\nStudio =5.1.2.201903111843\r\nTitanium SDK\r\n SDK Version = 8.1.0.v20190423074844\r\nDevice = Oneplus 5T android 9,samsung s5 android 6\r\nEmulator. = pixel 2 xl android 8\r\n{code}", "updateAuthor": { "name": "kmahalingam", "key": "kmahalingam", "displayName": "Keerthi Mahalingam", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2019-04-23T21:38:44.000+0000", "updated": "2019-04-23T21:38:44.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }