{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/pt/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Transmissão ao vivo do Cloud Phone"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"transmissão-ao-vivo-do-cloud-phone","__idx":0},"children":["Transmissão ao vivo do Cloud Phone"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use a API aberta ou a API local para carregar um arquivo MP4, iniciar a transmissão, consultar o status e encerrá-la."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pré-requisitos","__idx":1},"children":["Pré-requisitos"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use um modelo compatível; outros modelos retornam atualmente ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]},". Ligue o Cloud Phone e obtenha um token OAuth2 com permissão de operação."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["O arquivo deve ser MP4 e ser enviado com ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType=2"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"fluxo-da-api-aberta","__idx":2},"children":["Fluxo da API aberta"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chame ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadUrl"]}," e envie o MP4 para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["presignedUrl"]}," usando HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Chame ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFile"]}," com ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Consulte ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/uploadFileResult"]},". Se ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", continue consultando; pare quando ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.status"]}," for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," (sucesso) ou ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}," (falha)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Envie o valor exato da string ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.fileId"]}," como ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["int64"]}," para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /cloudphone/live/start"]},". Em JavaScript, use serialização de precisão arbitrária e não converta por ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Number"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudphone/live/status"]}," para consultar e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/cloudphone/live/end"]}," para encerrar."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Na API local, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file/signedUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file"]}," com ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uploadType: 2"]}," e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/upload/file/result"]},"; depois chame ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/cloudphone/live/start"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/status"]}," ou ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/end"]},". O saldo e as cotas estão disponíveis em ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /api/balance"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Consulte a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt/api-reference/cloud-phone/open-api"},"children":["API aberta"]}," e a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt/api-reference/cloud-phone/local-api"},"children":["API local"]}," do Cloud Phone para os esquemas completos. Em caso de timeout ao iniciar, consulte o status antes de repetir. Os códigos da transmissão são ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33300"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33301"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33401"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33418"]}," e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["99002"]},"; a API de upload retorna ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["33419"]}," para arquivos que não são MP4."]}]},"headings":[{"value":"Transmissão ao vivo do Cloud Phone","id":"transmissão-ao-vivo-do-cloud-phone","depth":1},{"value":"Pré-requisitos","id":"pré-requisitos","depth":2},{"value":"Fluxo da API aberta","id":"fluxo-da-api-aberta","depth":2}],"frontmatter":{"seo":{"title":"Transmissão ao vivo do Cloud Phone"}},"lastModified":"2026-09-10T13:09:25.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt/api-reference/cloud-phone/live-streaming","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}