{"action":"created","comment":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/23404296","id":23404296,"diff_hunk":"@@ -58,9 +63,58 @@ public void PlayMovieFullscreen(string movie, LuaFunction func = null)\n \t\t\t\t};\n \t\t\t}\n \t\t\telse\n-\t\t\t\tonComplete = () => { };\n+\t\t\t\tonCompleteFullscreen = () => { };\n \n-\t\t\tMedia.PlayFMVFullscreen(world, movie, onComplete);\n+\t\t\tMedia.PlayFMVFullscreen(world, movie, onCompleteFullscreen);\n+\t\t}\n+\n+\t\tAction onLoadComplete;\n+\t\tAction onCompleteRadar;\n+\t\t[Desc(\"Play a VQA video in the radar window.  File name has to include the file extension.\")]\n+\t\tpublic void PlayMovieInRadar(string movie, LuaFunction func = null)\n+\t\t{\n+\t\t\tif (func != null)\n+\t\t\t{\n+\t\t\t\tvar f = func.CopyReference() as LuaFunction;\n+\t\t\t\tonCompleteRadar = () =>\n+\t\t\t\t{\n+\t\t\t\t\ttry\n+\t\t\t\t\t{\n+\t\t\t\t\t\tusing (f)\n+\t\t\t\t\t\t\tf.Call();\n+\t\t\t\t\t}\n+\t\t\t\t\tcatch (LuaException e)\n+\t\t\t\t\t{\n+\t\t\t\t\t\tContext.FatalError(e.Message);\n+\t\t\t\t\t}\n+\t\t\t\t};\n+\t\t\t}\n+\t\t\telse\n+\t\t\t\tonCompleteRadar = () => { };\n+\n+\t\t\tStream s = null;\n+\t\t\ttry\n+\t\t\t{\n+\t\t\t\ts = GlobalFileSystem.Open(movie);\n+\t\t\t}\n+\t\t\tcatch (FileNotFoundException e)\n+\t\t\t{\n+\t\t\t\tContext.FatalError(e.Message);","path":"OpenRA.Mods.Common/Scripting/Global/MediaGlobal.cs","position":81,"original_position":81,"commit_id":"bbc4228a6f6e1a010829da3208d28c4433b46756","original_commit_id":"bbc4228a6f6e1a010829da3208d28c4433b46756","user":{"login":"obrakmann","id":4331210,"avatar_url":"https://avatars.githubusercontent.com/u/4331210?v=3","gravatar_id":"","url":"https://api.github.com/users/obrakmann","html_url":"https://github.com/obrakmann","followers_url":"https://api.github.com/users/obrakmann/followers","following_url":"https://api.github.com/users/obrakmann/following{/other_user}","gists_url":"https://api.github.com/users/obrakmann/gists{/gist_id}","starred_url":"https://api.github.com/users/obrakmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obrakmann/subscriptions","organizations_url":"https://api.github.com/users/obrakmann/orgs","repos_url":"https://api.github.com/users/obrakmann/repos","events_url":"https://api.github.com/users/obrakmann/events{/privacy}","received_events_url":"https://api.github.com/users/obrakmann/received_events","type":"User","site_admin":false},"body":"I think this is not a good idea. We cannot rely on people having the movies installed.","created_at":"2015-01-22T19:52:15Z","updated_at":"2015-01-22T19:52:15Z","html_url":"https://github.com/OpenRA/OpenRA/pull/7156#discussion_r23404296","pull_request_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156","_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/23404296"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7156#discussion_r23404296"},"pull_request":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156"}}},"pull_request":{"url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156","id":26415863,"html_url":"https://github.com/OpenRA/OpenRA/pull/7156","diff_url":"https://github.com/OpenRA/OpenRA/pull/7156.diff","patch_url":"https://github.com/OpenRA/OpenRA/pull/7156.patch","issue_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7156","number":7156,"state":"open","locked":false,"title":"Lua API : Added floating text and radar video","user":{"login":"DeadlySurprise","id":7755963,"avatar_url":"https://avatars.githubusercontent.com/u/7755963?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadlySurprise","html_url":"https://github.com/DeadlySurprise","followers_url":"https://api.github.com/users/DeadlySurprise/followers","following_url":"https://api.github.com/users/DeadlySurprise/following{/other_user}","gists_url":"https://api.github.com/users/DeadlySurprise/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadlySurprise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadlySurprise/subscriptions","organizations_url":"https://api.github.com/users/DeadlySurprise/orgs","repos_url":"https://api.github.com/users/DeadlySurprise/repos","events_url":"https://api.github.com/users/DeadlySurprise/events{/privacy}","received_events_url":"https://api.github.com/users/DeadlySurprise/received_events","type":"User","site_admin":false},"body":"This adds two new functions to the Media lua api.\r\n1. FloatingText (string text, WPos position, int duration = 30) displays a text at the specified location.\r\n2. LoadMovieAsync(string movie, LuaFunction func) and \r\n    PlayMovieInRadar(VqaReader reader, LuaFunction func = null) plays a video over the ingame radar which is used in some CnC campaigns\r\n\r\nThe simplest way to use the latter is Media.LoadMovieAsync(\"[videoName].vqa\", Media.PlayMovieInRadar), but lua callbacks [func(VqaReader video)] are supported as well as storing the video in a global lua variable.\r\n","created_at":"2014-12-20T12:28:57Z","updated_at":"2015-01-22T19:52:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78e0dd48336555b1c68740930b6287e8f6dc3116","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156/commits","review_comments_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156/comments","review_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/7156/comments","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/bbc4228a6f6e1a010829da3208d28c4433b46756","head":{"label":"DeadlySurprise:luaMediaApi","ref":"luaMediaApi","sha":"bbc4228a6f6e1a010829da3208d28c4433b46756","user":{"login":"DeadlySurprise","id":7755963,"avatar_url":"https://avatars.githubusercontent.com/u/7755963?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadlySurprise","html_url":"https://github.com/DeadlySurprise","followers_url":"https://api.github.com/users/DeadlySurprise/followers","following_url":"https://api.github.com/users/DeadlySurprise/following{/other_user}","gists_url":"https://api.github.com/users/DeadlySurprise/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadlySurprise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadlySurprise/subscriptions","organizations_url":"https://api.github.com/users/DeadlySurprise/orgs","repos_url":"https://api.github.com/users/DeadlySurprise/repos","events_url":"https://api.github.com/users/DeadlySurprise/events{/privacy}","received_events_url":"https://api.github.com/users/DeadlySurprise/received_events","type":"User","site_admin":false},"repo":{"id":23546296,"name":"OpenRA","full_name":"DeadlySurprise/OpenRA","owner":{"login":"DeadlySurprise","id":7755963,"avatar_url":"https://avatars.githubusercontent.com/u/7755963?v=3","gravatar_id":"","url":"https://api.github.com/users/DeadlySurprise","html_url":"https://github.com/DeadlySurprise","followers_url":"https://api.github.com/users/DeadlySurprise/followers","following_url":"https://api.github.com/users/DeadlySurprise/following{/other_user}","gists_url":"https://api.github.com/users/DeadlySurprise/gists{/gist_id}","starred_url":"https://api.github.com/users/DeadlySurprise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeadlySurprise/subscriptions","organizations_url":"https://api.github.com/users/DeadlySurprise/orgs","repos_url":"https://api.github.com/users/DeadlySurprise/repos","events_url":"https://api.github.com/users/DeadlySurprise/events{/privacy}","received_events_url":"https://api.github.com/users/DeadlySurprise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DeadlySurprise/OpenRA","description":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":true,"url":"https://api.github.com/repos/DeadlySurprise/OpenRA","forks_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/forks","keys_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/teams","hooks_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/events","assignees_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/tags","blobs_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/languages","stargazers_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/subscription","commits_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/issues/comments/{number}","contents_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/merges","archive_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/downloads","issues_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/DeadlySurprise/OpenRA/releases{/id}","created_at":"2014-09-01T15:03:50Z","updated_at":"2015-01-04T15:15:21Z","pushed_at":"2015-01-07T21:17:10Z","git_url":"git://github.com/DeadlySurprise/OpenRA.git","ssh_url":"git@github.com:DeadlySurprise/OpenRA.git","clone_url":"https://github.com/DeadlySurprise/OpenRA.git","svn_url":"https://github.com/DeadlySurprise/OpenRA","homepage":"http://www.openra.net","size":78858,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bleed"}},"base":{"label":"OpenRA:bleed","ref":"bleed","sha":"40c9d0a47dab215824867e3ae82ca311071c7f4e","user":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"repo":{"id":959908,"name":"OpenRA","full_name":"OpenRA/OpenRA","owner":{"login":"OpenRA","id":409046,"avatar_url":"https://avatars.githubusercontent.com/u/409046?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenRA","html_url":"https://github.com/OpenRA","followers_url":"https://api.github.com/users/OpenRA/followers","following_url":"https://api.github.com/users/OpenRA/following{/other_user}","gists_url":"https://api.github.com/users/OpenRA/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenRA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenRA/subscriptions","organizations_url":"https://api.github.com/users/OpenRA/orgs","repos_url":"https://api.github.com/users/OpenRA/repos","events_url":"https://api.github.com/users/OpenRA/events{/privacy}","received_events_url":"https://api.github.com/users/OpenRA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenRA/OpenRA","description":"An open-source implementation of the Command & Conquer: Red Alert engine using .NET/Mono and OpenGL. Runs on Windows, Linux and Mac OS X.","fork":false,"url":"https://api.github.com/repos/OpenRA/OpenRA","forks_url":"https://api.github.com/repos/OpenRA/OpenRA/forks","keys_url":"https://api.github.com/repos/OpenRA/OpenRA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenRA/OpenRA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenRA/OpenRA/teams","hooks_url":"https://api.github.com/repos/OpenRA/OpenRA/hooks","issue_events_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/events{/number}","events_url":"https://api.github.com/repos/OpenRA/OpenRA/events","assignees_url":"https://api.github.com/repos/OpenRA/OpenRA/assignees{/user}","branches_url":"https://api.github.com/repos/OpenRA/OpenRA/branches{/branch}","tags_url":"https://api.github.com/repos/OpenRA/OpenRA/tags","blobs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenRA/OpenRA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenRA/OpenRA/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenRA/OpenRA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenRA/OpenRA/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenRA/OpenRA/languages","stargazers_url":"https://api.github.com/repos/OpenRA/OpenRA/stargazers","contributors_url":"https://api.github.com/repos/OpenRA/OpenRA/contributors","subscribers_url":"https://api.github.com/repos/OpenRA/OpenRA/subscribers","subscription_url":"https://api.github.com/repos/OpenRA/OpenRA/subscription","commits_url":"https://api.github.com/repos/OpenRA/OpenRA/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenRA/OpenRA/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenRA/OpenRA/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenRA/OpenRA/issues/comments/{number}","contents_url":"https://api.github.com/repos/OpenRA/OpenRA/contents/{+path}","compare_url":"https://api.github.com/repos/OpenRA/OpenRA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenRA/OpenRA/merges","archive_url":"https://api.github.com/repos/OpenRA/OpenRA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenRA/OpenRA/downloads","issues_url":"https://api.github.com/repos/OpenRA/OpenRA/issues{/number}","pulls_url":"https://api.github.com/repos/OpenRA/OpenRA/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenRA/OpenRA/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenRA/OpenRA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenRA/OpenRA/labels{/name}","releases_url":"https://api.github.com/repos/OpenRA/OpenRA/releases{/id}","created_at":"2010-10-04T07:38:05Z","updated_at":"2015-01-22T09:26:58Z","pushed_at":"2015-01-21T19:14:33Z","git_url":"git://github.com/OpenRA/OpenRA.git","ssh_url":"git@github.com:OpenRA/OpenRA.git","clone_url":"https://github.com/OpenRA/OpenRA.git","svn_url":"https://github.com/OpenRA/OpenRA","homepage":"http://www.openra.net","size":151583,"stargazers_count":1654,"watchers_count":1654,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":562,"mirror_url":null,"open_issues_count":688,"forks":562,"open_issues":688,"watchers":1654,"default_branch":"bleed"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156"},"html":{"href":"https://github.com/OpenRA/OpenRA/pull/7156"},"issue":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7156"},"comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/issues/7156/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OpenRA/OpenRA/pulls/7156/commits"},"statuses":{"href":"https://api.github.com/repos/OpenRA/OpenRA/statuses/bbc4228a6f6e1a010829da3208d28c4433b46756"}}}}