{"id":16220373,"url":"https://github.com/kosso/tiscreenrecorder","last_synced_at":"2025-03-19T11:30:54.164Z","repository":{"id":138913411,"uuid":"74148051","full_name":"kosso/TiScreenRecorder","owner":"kosso","description":"A simple Titanium iOS module for screen recording. ","archived":false,"fork":false,"pushed_at":"2016-11-22T14:09:54.000Z","size":373,"stargazers_count":28,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T18:23:11.095Z","etag":null,"topics":["appcelerator","ios","module","screen-recorder","titanium"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kosso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-18T16:38:43.000Z","updated_at":"2019-02-22T06:50:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"d8ae33ce-2a0e-411d-8a5a-287594b4bdb1","html_url":"https://github.com/kosso/TiScreenRecorder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosso%2FTiScreenRecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosso%2FTiScreenRecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosso%2FTiScreenRecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kosso%2FTiScreenRecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kosso","download_url":"https://codeload.github.com/kosso/TiScreenRecorder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243985899,"owners_count":20379223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appcelerator","ios","module","screen-recorder","titanium"],"created_at":"2024-10-10T11:58:32.717Z","updated_at":"2025-03-19T11:30:54.157Z","avatar_url":"https://github.com/kosso.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nTiScreenRecorder\n===========================================\n\nA simple Appcelerator Titanium module for iOS screen recording.\n\n---------\n\n#### Usage\n\nExample app.js\n\n```javascript\n\n\n// TiScreenRecorder : example app. \n// @kosso : November 2016\n\n\n// open a single window\nvar win = Ti.UI.createWindow({\n\tbackgroundColor:'white'\n});\n\nvar label = Ti.UI.createLabel({\n\ttext: 'ready',\n\tbackgroundColor: '#99ffffff',\n\tcolor: '#333',\n\twidth: Ti.UI.SIZE,\n\tborderRadius: 6,\n\tbottom: 5,\n\tleft: 5,\n\tzIndex: 10\n});\n\nwin.add(label);\n\nvar screenrecorder = require('com.kosso.tiscreenrecorder');\n\nvar isRecording = false;\n\n\nvar btn_rec = Ti.UI.createButton({\n\t  title: ' o ',\n\t  width: 30,\n\t  bottom: 5,\n\t  zIndex: 10,\n\t  height: 30,\n\t  borderRadius: 15,\n\t  color: 'white',\n\t  tintColor: 'white',\n\t  textAlign: 'center',\n\t  backgroundColor: '#990000'\n});\n\n\n\nbtn_rec.addEventListener('click', function(){\n\n\tif(isRecording){\n\t\tscreenrecorder.stopRecording();\n\t\tlabel.text = 'stopped';\n\t  \tsetTimeout(function(){\n\t  \t\tlabel.text = 'ready';\n\t  \t}, 3000);\n\n\t} else {\n\n\t\tvar d = new Date();\n\t\tvar filename = 'recording_'+d.getTime()+'.mp4';\n\t\tvar file = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, filename);\n\t\tif ( file.exists() ) {\n\t\t     file.deleteFile();\n\t\t}\n\t\tvar video_url = file.nativePath; // eg: file:///etc/etc...\n\t\tfile = null;\n\t\tconsole.log('video_url : ', video_url);\n\n\t\t\t\n\t \tscreenrecorder.startRecording(video_url);\n\t \t// To just automatically save the video to the Camera Roll, leave out the video url \n\t \t// eg: screenrecorder.startRecording();\n\n\t \tlabel.text = 'recording';\n\t\t\n\t}\n\tisRecording = !isRecording;\n});\n\n\nscreenrecorder.addEventListener('success', function(e){\n\tconsole.log('screen recording done! : ', e);\n\t// Saved video is at e.nativePath (if a video_url was set)\n\n});\n\n// Just something to record... \n\nvar wv = Ti.UI.createWebView({\n\turl : 'http://www.bbc.co.uk/news',\n\twidth: Ti.UI.FILL,\n\theight: Ti.UI.FILL,\n\tbackgroundColor: '#eee',\n\tzIndex: 1\n});\n\nwin.add(wv);\nwin.add(btn_rec);\n\nwin.open();\n```\n\n---------------\n\nIdeas:\n\n- Hide recording button when starting. Add a shake gesture to stop recording.\n\n- Add audio recording.\n\n- Allow specifying an area of screen to record.\n\n- Generate a GIF ;) \n\n- Show location of touches.\n\n  ​\n\n-------\n\n**Credit** : \n\n- ASScreenRecorder : https://github.com/alskipp/ASScreenRecorder\n- For the inspiration in an unrelated test app by @mattbierner - https://github.com/mattbierner/tenome-app\n- For the instructions to show how to enable ARC only on selected (required) files in Titanium modules. - http://www.itexico.com/blog/bid/100221/Mobile-App-Development-Advanced-Tricks-For-iOS-Modules-In-Appcelerator-Titanium\n\n------\n\n**Author** : @kosso - November 2016\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosso%2Ftiscreenrecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkosso%2Ftiscreenrecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkosso%2Ftiscreenrecorder/lists"}