{ "id": "62934", "key": "TIMOB-2302", "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": "11237", "name": "Release 1.6.0 M04", "archived": true, "released": true, "releaseDate": "2011-01-10" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:58:42.000+0000", "created": "2011-04-15T03:16:10.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect", "redirect", "release-1.6.0", "retest", "video" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:58:42.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": "{html}

This is actually an android bug:
\nhttp://code.google.com/p/android/issues/detail?id=10810

{html}", "attachment": [ { "id": "18133", "filename": "device.png", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:11.000+0000", "size": 5449, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: VideoPlayer doesn't follow HTTP redirects", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "128096", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [cd013b27782de574d44db8d9134118368b814c16])\ntry to follow http redirects since MediaPlayer can't handle them.\nalso allow for the \"url\" property in the creation dict [#2302\nstate:fixed-in-qa] \nhttps://github.com/appcelerator/titanium_mobile/commit/cd013b27782d...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:11.000+0000", "updated": "2011-04-15T03:16:11.000+0000" }, { "id": "128097", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

still fails to play.

\n

http://pastie.org/1374155

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:11.000+0000", "updated": "2011-04-15T03:16:11.000+0000" }, { "id": "128098", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

incorrect test case.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:11.000+0000", "updated": "2011-04-15T03:16:11.000+0000" }, { "id": "128099", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

fixed test case, still fails.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:12.000+0000", "updated": "2011-04-15T03:16:12.000+0000" }, { "id": "128100", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

updated test case.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:12.000+0000", "updated": "2011-04-15T03:16:12.000+0000" }, { "id": "128101", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Moving this to TBS for now, but my hunch is that underlying\nissue is actually fixed, but the circumstances needed to play the\nvideo we're testing with are device / codec dependent.

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:12.000+0000", "updated": "2011-04-15T03:16:12.000+0000" }, { "id": "128102", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Marshall look at ticket #2725 for another test case. That is still\nfailing with a redirect. There may still be encoding issues with\nthe source video, but the post redirect URL will at least play\naudio.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:12.000+0000", "updated": "2011-04-15T03:16:12.000+0000" }, { "id": "128103", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [b8b7bad9bb64c7626d109223f3f9edb5219497c7])\nsupport redirects that use absolute paths as well as URLs [#2302\nstate:fixed-in-qa] [#2725]
\n\nhttps://github.com/appcelerator/titanium_mobile/commit/b8b7bad9bb64...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:13.000+0000", "updated": "2011-04-15T03:16:13.000+0000" }, { "id": "128104", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Using [INFO] Titanium SDK version: 1.6.0 (01/10/11\n08:25 3452f06) and droid1 (2.2.1) G1 (1.6) and 2.1 emulator - Matts\ncode and the code linked in #2725 fail with a rhino error and a\nclassCastexception:

\n

D/KrollContext( 3505): (kroll$3) [19424,31629] Running evaluated\nscript: app://folder/2654.js
\nI/ActivityManager( 76): Starting activity: Intent {\ncmp=com.appcelerator.QAtests/ti.modules.titanium.media.TiVideoActivity\n(has extras) }
\nE/TiVideoActivity( 3505): (main) [148,31777] exiting onCreate
\nE/KrollMethod( 3505): (kroll$3) [4,31781] Exception calling kroll\nmethod add, invocation: null ]
\nE/KrollMethod( 3505): java.lang.ClassCastException:\nti.modules.titanium.media.VideoPlayerProxy
\nE/KrollMethod( 3505): at\norg.appcelerator.titanium.proxy.TiViewProxyBindingGen$15.invoke(TiViewProxyBindingGen.java:662)
\nE/KrollMethod( 3505): at\norg.appcelerator.kroll.KrollMethod.call(KrollMethod.java:48)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
\nE/KrollMethod( 3505): at\norg.mozilla.javascript.Context.evaluateReader(Context.java:1142)
\nE/KrollMethod( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:195)
\nE/KrollMethod( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:220)
\nE/KrollMethod( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:115)
\nE/KrollMethod( 3505): at\nandroid.os.Handler.dispatchMessage(Handler.java:95)
\nE/KrollMethod( 3505): at\nandroid.os.Looper.loop(Looper.java:123)
\nE/KrollMethod( 3505): at\norg.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
\nI/ActivityManager( 76): Displayed activity\ncom.appcelerator.QAtests/ti.modules.titanium.media.TiVideoActivity:\n215 ms (total 215 ms)
\nE/KrollContext( 3505): (kroll$3) [109,31890] Error evaluating\nsource: Wrapped java.lang.ClassCastException:\nti.modules.titanium.media.VideoPlayerProxy\n(app://folder/2654.js#41)
\nE/KrollContext( 3505): org.mozilla.javascript.WrappedException:\nWrapped java.lang.ClassCastException:\nti.modules.titanium.media.VideoPlayerProxy\n(app://folder/2654.js#41)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1781)
\nE/KrollContext( 3505): at\norg.appcelerator.kroll.KrollMethod.call(KrollMethod.java:85)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1711)
\nE/KrollContext( 3505): at script(app://folder/2654.js:41)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.Interpreter.interpret(Interpreter.java:854)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3161)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
\nE/KrollContext( 3505): at\norg.mozilla.javascript.Context.evaluateReader(Context.java:1142)
\nE/KrollContext( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.evaluateScript(KrollContext.java:195)
\nE/KrollContext( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:220)
\nE/KrollContext( 3505): at\norg.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:115)
\nE/KrollContext( 3505): at\nandroid.os.Handler.dispatchMessage(Handler.java:95)
\nE/KrollContext( 3505): at\nandroid.os.Looper.loop(Looper.java:123)
\nE/KrollContext( 3505): at\norg.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
\nE/KrollContext( 3505): Caused by: java.lang.ClassCastException:\nti.modules.titanium.media.VideoPlayerProxy
\nE/KrollContext( 3505): at\norg.appcelerator.titanium.proxy.TiViewProxyBindingGen$15.invoke(TiViewProxyBindingGen.java:662)
\nE/KrollContext( 3505): at\norg.appcelerator.kroll.KrollMethod.call(KrollMethod.java:48)
\nE/KrollContext( 3505): ... 13 more
\nE/TiContext( 3505): (kroll$3) [104,31994] Rhino Error:\napp://folder/2654.js:41,0
\nE/TiContext( 3505): (kroll$3) [2,31996] Message: Wrapped\njava.lang.ClassCastException:\nti.modules.titanium.media.VideoPlayerProxy\n(app://folder/2654.js#41)
\nE/TiContext( 3505): (kroll$3) [2,31998] Source: null

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:13.000+0000", "updated": "2011-04-15T03:16:13.000+0000" }, { "id": "128105", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The code in #2725 is invalid. You cannot add a video view to\na window. In matt's code there isn't a call to win.add(vid) so it\nshouldn't fail the same way.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:13.000+0000", "updated": "2011-04-15T03:16:13.000+0000" }, { "id": "128106", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

ugh, sorry - Matts code produces http://pastie.org/1450474

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:14.000+0000", "updated": "2011-04-15T03:16:14.000+0000" }, { "id": "128107", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

\"open()\" doesn't exist on VideoPlayer in Android (never has) ...\nyou have to simply use \"play()\"

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:14.000+0000", "updated": "2011-04-15T03:16:14.000+0000" }, { "id": "128108", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Thanks Marshall, using play I saw the fix on a G2 (2.2) and\nemulator running 2.1, but on the g1 (1.6) I fail and see an alert\n\"Video View. unknown error\" with a button that says error. logcat\nsays

\n

D/KrollContext( 4368): (kroll$6) [5810,6996] Running evaluated\nscript: app://folder/2302.js
\nI/TiAPI ( 4368): (kroll$6) [95,7091] createVideo Player
\nI/TiAPI ( 4368): (kroll$6) [57,7148] Done
\nI/TiAPI ( 4368): (kroll$6) [1937,9085] launch Movie
\nI/ActivityManager( 76): Starting activity: Intent {\ncmp=com.appcelerator.QAtests/ti.modules.titanium.media.TiVideoActivity\n(has extras) }
\nE/TiVideoActivity( 4368): (main) [57,9142] exiting onCreate
\nV/VideoView( 4368): reset duration to -1 in openVideo
\nI/InetAddress( 4368): Unknown host m.nbc.com, throwing\nUnknownHostException
\nD/MediaPlayer( 4368): Couldn't open file on client side, trying\nserver side
\nI/ActivityManager( 76): Displayed activity\ncom.appcelerator.QAtests/ti.modules.titanium.media.TiVideoActivity:\n427 ms (total 427 ms)
\nE/PlayerDriver( 51): Command PLAYER_INIT completed with an error or\ninfo PVMFFailure
\nE/MediaPlayer( 4368): error (1, -1)
\nE/MediaPlayer( 4368): Error (1,-1)
\nD/VideoView( 4368): Error: 1,-1
\nW/PlayerDriver( 51): PVMFInfoErrorHandlingComplete

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:14.000+0000", "updated": "2011-04-15T03:16:14.000+0000" }, { "id": "128109", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hrm.. the error there is an UnknownHostException, is your G1\nconnected to the internet?

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:14.000+0000", "updated": "2011-04-15T03:16:14.000+0000" }, { "id": "128110", "author": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

epic fail on my part. I'm done testing for the day. G1 works as\nexpected.

{html}", "updateAuthor": { "name": "thomashuelbert", "key": "thomashuelbert", "displayName": "Thomas Huelbert", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:16:14.000+0000", "updated": "2011-04-15T03:16:14.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }