[英]How can i share media with my ionic app
I want to share my images and videos with application which was developed with ionic framework. 我想与使用离子框架开发的应用程序共享我的图像和视频。 How can I share them?
我该如何分享他们?
Have a look at Cordova Sharing Plugin ; 看看Cordova共享插件 ; that plugin let you share "content" using a native dialog to select the app to share with, or you can specifiy some popular apps to use for sharing (Twitter, Facebook, ...).
该插件可让您使用本机对话框选择要共享的应用程序来共享“内容”,或者您可以指定一些流行的应用程序来共享(Twitter,Facebook等)。
You can easily share images, text and links, but there are some limitations (particularly for Facebook). 您可以轻松共享图像,文本和链接,但是存在一些限制(尤其是对于Facebook)。 If you want to build a custom image to use for share (say a text with an avatar) you can prepare the image in pure Javascript using an HTML5 canvas.
如果要构建用于共享的自定义图像(例如带有头像的文本),则可以使用HTML5画布以纯Javascript准备图像。
For more information you can check this blog post , where the Cordova Sharing Plugin is used together with the HTML5 canvas approach. 有关更多信息,请查看此博客文章 ,其中将Cordova共享插件与HTML5 canvas方法一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.