{"_id":"5ade3c180916ec000353abe6","category":{"_id":"5ade3c170916ec000353ab9e","version":"5ade3c170916ec000353ab98","project":"578c4badbd223d2000cc1441","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-01T23:04:12.838Z","from_sync":false,"order":5,"slug":"api-reference","title":"API Reference"},"project":"578c4badbd223d2000cc1441","user":"579fce4e1435850e00dfbbbb","parentDoc":null,"version":{"_id":"5ade3c170916ec000353ab98","project":"578c4badbd223d2000cc1441","__v":1,"createdAt":"2018-04-23T20:03:35.726Z","releaseDate":"2018-04-23T20:03:35.726Z","categories":["5ade3c170916ec000353ab99","5ade3c170916ec000353ab9a","5ade3c170916ec000353ab9b","5ade3c170916ec000353ab9c","5ade3c170916ec000353ab9d","5ade3c170916ec000353ab9e"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.6.1","version":"2.6.1"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-04T00:07:09.780Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":86,"body":"A component that provides a control for video materials. This can be used to start, stop, play video textures.\n\n######Example use:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\n<ViroMaterialVideo ref={\\\"video_ref\\\"} material={\\\"test_material\\\"} paused={false}\\n           onBufferStart={this._onBufferStart} onBufferEnd={this._onBufferEnd}\\n          loop={true} muted={false} volume={1.0}\\n          onFinish={this._onVideoFinished} onUpdateTime={this._onUpdateTime} />\\n\\n//Video texture example:\\n \\nViroMaterials.createMaterials({\\n  test_material: {\\n    shininess: 2.0,\\n    lightingModel: \\\"Lambert\\\",\\n    diffuseTexture: require('./res/test_video.mp4'),\\n  },\\n});\\n\\n\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Props\"\n}\n[/block]\n##Optional Props\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**material**\",\n    \"0-1\": \"**PropTypes.string**\\nA string that each represent a video material that was created via ViroMaterials.createMaterials(). \\n\\nA video material has it's diffuseTexture property set to a video asset.\",\n    \"h-0\": \"PropKey\",\n    \"h-1\": \"PropType\",\n    \"1-0\": \"**paused**\",\n    \"2-0\": \"**loop**\",\n    \"3-0\": \"**muted**\",\n    \"4-0\": \"**volume**\",\n    \"1-1\": \"**PropTypes.bool**\\n\\nSet to true to pause the video. This is set to false by default.\",\n    \"2-1\": \"**PropTypes.bool**\\n\\nSet to true to loop the video. This is set to false by default.\",\n    \"3-1\": \"**PropTypes.bool**\\n\\nSet to true to mute the video. This is set to false by default.\",\n    \"4-1\": \"**PropTypes.number**\\n\\nA number represented volume from 0 to 1. Max volume is equal to 1. Min volume is equal to 0. This is set to 1 by default.\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]","excerpt":"","slug":"viromaterialvideo","type":"basic","title":"ViroMaterialVideo"}
A component that provides a control for video materials. This can be used to start, stop, play video textures. ######Example use: [block:code] { "codes": [ { "code": "\n<ViroMaterialVideo ref={\"video_ref\"} material={\"test_material\"} paused={false}\n onBufferStart={this._onBufferStart} onBufferEnd={this._onBufferEnd}\n loop={true} muted={false} volume={1.0}\n onFinish={this._onVideoFinished} onUpdateTime={this._onUpdateTime} />\n\n//Video texture example:\n \nViroMaterials.createMaterials({\n test_material: {\n shininess: 2.0,\n lightingModel: \"Lambert\",\n diffuseTexture: require('./res/test_video.mp4'),\n },\n});\n\n", "language": "javascript" } ] } [/block] [block:api-header] { "title": "Props" } [/block] ##Optional Props [block:parameters] { "data": { "0-0": "**material**", "0-1": "**PropTypes.string**\nA string that each represent a video material that was created via ViroMaterials.createMaterials(). \n\nA video material has it's diffuseTexture property set to a video asset.", "h-0": "PropKey", "h-1": "PropType", "1-0": "**paused**", "2-0": "**loop**", "3-0": "**muted**", "4-0": "**volume**", "1-1": "**PropTypes.bool**\n\nSet to true to pause the video. This is set to false by default.", "2-1": "**PropTypes.bool**\n\nSet to true to loop the video. This is set to false by default.", "3-1": "**PropTypes.bool**\n\nSet to true to mute the video. This is set to false by default.", "4-1": "**PropTypes.number**\n\nA number represented volume from 0 to 1. Max volume is equal to 1. Min volume is equal to 0. This is set to 1 by default." }, "cols": 2, "rows": 5 } [/block]