实际上,我需要使用flutter向联系人发送语音消息。我进行了很多搜索。但是对此我一无所知,有没有办法做到这一点??
答案 0 :(得分:1)
您可以使用 audio_recorder 包:
https://pub.dev/packages/audio_recorder
<dd id="single-artwork-collaborators"><?php
_e('Co-creators: ', 'aopa'); // multilanguage label for translation
$collaborators_all = []; // Create an empty Array
foreach ($artwork_collaborators as $artwork_collaborator) : // foreach loop to get all collaborators
if ($artwork_collaborator['artwork_collaborator_url']) : // check if there is a url for any of the collaborators
$collaborator = '<a href="'. $artwork_collaborator['artwork_collaborator_url'] . '" target="_blank">' . $artwork_collaborator['artwork_collaborator_name'] . '</a>'; // add rows in loop to the variable
else : // check if there are any collaborators without URLS
$collaborator = $artwork_collaborator['artwork_collaborator_name']; // add these rows in loop to the variable
endif;
$collaborators_all[] = $collaborator; // combine in the array created above all the rows of collaborator names, with and without and links, if there are any of each
endforeach;
$collaborator_string = implode(", ", $collaborators_all); // implode the array and add commas
echo $collaborator_string; // echo the collaborators separated by commas if there is more than one ?>
</dd><?php
endif; ?>
答案 1 :(得分:0)
如果您想在聊天(例如 firebase 聊天)中分享语音消息,您可以使用 flutter_sound,将语音文件发送到您的云端,您也可以使用 flutter_sound 再次播放。