{"_id":"5ade3c180916ec000353abf4","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"},"parentDoc":null,"project":"578c4badbd223d2000cc1441","user":"576c22a3808cf02b00d37419","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":"2017-03-18T01:09:44.923Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":100,"body":"A component that enables the control and playback of ambisonic sound files. Refer to [Sound](doc:audio) under Develop for more information.\n\n######Example use:\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"<ViroSoundField\\n source={require(\\\"./sound/mysound.wav\\\")}\\n rotation={[0,90,0]}\\n paused={false}\\n onFinish={this.onFinishSound} />\",\n \"language\": \"javascript\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Props\"\n}\n[/block]\n##Required props\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"PropKey\",\n \"h-1\": \"PropType\",\n \"0-1\": \"**PropTypes.oneOfType( [PropTypes.shape( {uri:PropTypes.string} ), PropTypes.number])**\\n\\nAn ambisonic sound file. Only supports multi-channel audio files.\",\n \"0-0\": \"**source**\"\n },\n \"cols\": 2,\n \"rows\": 1\n}\n[/block]\n##Optional Props\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"**loop**\",\n \"1-0\": \"**muted**\",\n \"h-0\": \"PropKey\",\n \"h-1\": \"PropType\",\n \"0-1\": \"**PropTypes.bool**\\n\\nSet to true to loop the sound field. This is set to false by default.\",\n \"1-1\": \"**PropTypes.bool**\\n\\nSet to true to mute the sound field. This is set to false by default.\",\n \"3-0\": \"**onFinish**\",\n \"3-1\": \"**React.PropTypes.func**\\n\\nCallback that is called when the sound field is finished playing. This function isn't called at the end of a sound field if looping is enabled.\",\n \"4-0\": \"**paused**\",\n \"4-1\": \"**PropTypes.bool**\\n\\nSet to true to pause the sound field. This is set to false by default.\",\n \"6-0\": \"**volume**\",\n \"6-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 \"2-0\": \"**onError**\",\n \"2-1\": \"**React.PropTypes.func**\\n\\nCallback invoked when the 360 Image fails to load. The error message is contained in event.nativeEvent.error\",\n \"5-0\": \"**rotation**\",\n \"5-1\": \"**PropTypes.arrayOf(PropTypes.number),**\\n\\nThe rotation which will be applied to the ambisonic sound.\"\n },\n \"cols\": 2,\n \"rows\": 7\n}\n[/block]","excerpt":"","slug":"virosoundfield","type":"basic","title":"ViroSoundField"}