In the past two years, short video has gradually changed from a hot spot to a normal one. Whether it is entertainment making friends, online education, product evaluation or food sharing, various applications have added colorful video content. Short video is gradually replacing the original way of information sharing and occupying people’s leisure time.
Av development requires a certain learning cost, from the video clips and effect processing, rate and the choice of a variety of audio sound effects processing, it takes a certain time of learning to achieve mastery through a comprehensive, not only that, but also to build a CDN distributed online video ensure the fluency of the watch, on the existing business scenarios increase short video function, Do you have to bring in experienced developers and toil away for a few months to get it online?
As cloud technology matures, there are now more options. No matter the various effects of audio and video processing, or complicated UI logic development, or online video processing, these can be well solved by integrating Tencent cloud short video solution. Tencent Cloud short video SDK not only provides rich functions, but also provides an interface component: UGCKit, and attached with a complete short video program Demo. With its convenient theme customization capability, it can quickly integrate short video functions on existing apps.
By scanning the following QR code, you can download and experience the Demo. All the functions in the Demo can be integrated into the existing App in a minute.
The Demo experience | |
iOS | Android |
Tencent cloud short video program source hosted on Github, the address is github.com/tencentyun/… In which you can see both iOS and Android source code and detailed integration into the introduction. If the access is inconvenient, you can also obtain the image address from gitee.com/cloudtencen… .
UGCKit builds a simple reusable UI solution that integrates short video functions with just a few lines of code.
For example, to add a recording interface on the Android platform, create an activity_video_record. XML file with the following content
<com.tencent.qcloud.ugckit.UGCKitVideoRecord
android:id="@+id/video_record_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Copy the code
Set the above XML to the interface through the Activity setContentView(R.layout.activity_video_record), that is, complete a recording interface with beauty, AI effects, filters, sound changes and other functions.
On iOS, initialize a recording controller to display.
UGCKitRecordViewController *recordViewController = [[UGCKitRecordViewController alloc] initWithConfig:nil theme:nil];
[self.navigationController pushViewController:recordViewController]
Copy the code
If the color doesn’t match the theme of the existing App, it can also be quickly changed. The advantage of this scheme over others is that the Settings of all appearance elements are centralized, and you can quickly change theme colors and images without having to search through the source code. The following is an example of the INTERFACE configuration XML for Android:
<style name="RecordActivityTheme" parent="RecordStyle">
<item name="recordMusicIcon">@drawable/ic_music</item>
<item name="recordBeautyIcon">@drawable/ic_beauty</item>
</style>
Copy the code
This is an example of changing the music selection icon and beauty icon. On iOS, theme changes are made using the UGCKitTheme class. The above changes can be made by setting the properties:
UGCKitTheme *theme = [[UGCKitTheme alloc]init];
theme.recordMusicIcon = [UIImage imagewithName:@"ic_music"];
theme.recordBeautyIcon = [UIImage imagewithName:@"ic_beauty"];
Copy the code
Once the theme is configured, pass it in through the Activity’s setTheme method or the iOS controller’s initialization method.
Other features such as editing and clipping are the same and can be integrated into the App with just a few lines of code.
Now visit github.com/tencentyun/… Begin to experience.