admin
2020-10-10 8039a1b2fbfa3471b6f726d3e839d7867c81a84f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * Copyright (c) 2013 Sohu TV. All rights reserved.
 */
package com.weikou.beibeivideo.ui.sohuutils;
 
import android.app.Activity;
 
import com.sohuvideo.api.SohuPlayerItemBuilder;
 
public class ControllerFactory {
    public static SohuControllerWindow createController(Activity ctx, int from) {
        switch (from) {
            case SohuPlayerItemBuilder.TYPE_ONLIVE_VIDEO_SOHU:
                return new SohuControllerWindow(ctx);
            case SohuPlayerItemBuilder.TYPE_LIVE_VIDEO_SOHU:
            case SohuPlayerItemBuilder.TYPE_LIVE_VIDEO_URL:
                return new LiveControllerPopWindow(ctx);
            case SohuPlayerItemBuilder.TYPE_ONLIVE_VIDEO_URL:
            case SohuPlayerItemBuilder.TYPE_LOCAL_VIDEO_URL:
            case SohuPlayerItemBuilder.TYPE_LOCAL_VIDEO_DOWNLOAD:
                return new LocalControllerPopWindow(ctx);
            default:
                break;
        }
        return null;
    }
}