Commit 20253d7f authored by wangqinghua's avatar wangqinghua

视频不同时播放

parent cf6ad0f0
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.3.10" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.3.11" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>部机关党建云(测试)</name>
<description>An awesome Ionic/Cordova app.</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
......
......@@ -156,11 +156,6 @@
"resolved": "https://registry.npmjs.org/@ionic-native/status-bar/-/status-bar-4.4.0.tgz",
"integrity": "sha512-ZLlIdNh9XpA+XrOJ+Bt0hHxxhpE/bLzv77CBLIYb7twYrsK4QU5d43PtCLQeOqBz7ZX2SPMea+84Kt4mrsY1gQ=="
},
"@ionic-native/video-player": {
"version": "4.20.0",
"resolved": "http://r.cnpmjs.org/@ionic-native/video-player/download/@ionic-native/video-player-4.20.0.tgz",
"integrity": "sha1-LzbvKBjR9Z7JKUs9OMss+Asf8Ms="
},
"@ionic/app-scripts": {
"version": "3.1.8",
"resolved": "https://registry.npmjs.org/@ionic/app-scripts/-/app-scripts-3.1.8.tgz",
......@@ -6604,7 +6599,7 @@
"version": "1.0.2",
"bundled": true,
"requires": {
"dezalgo": "^1.0.2"
"dezalgo": "1.0.3"
}
},
"block-stream": {
......@@ -6684,8 +6679,8 @@
"version": "1.0.3",
"bundled": true,
"requires": {
"asap": "^2.0.0",
"wrappy": "1"
"asap": "2.0.3",
"wrappy": "1.0.2"
},
"dependencies": {
"asap": {
......@@ -6727,10 +6722,10 @@
"version": "1.0.10",
"bundled": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
"mkdirp": ">=0.5 0",
"rimraf": "2"
"graceful-fs": "4.1.6",
"inherits": "2.0.3",
"mkdirp": "0.5.1",
"rimraf": "2.5.4"
}
},
"fstream-npm": {
......@@ -6941,7 +6936,7 @@
"version": "3.0.6",
"bundled": true,
"requires": {
"abbrev": "1"
"abbrev": "1.0.9"
}
},
"normalize-git-url": {
......@@ -7199,13 +7194,13 @@
"version": "4.0.3",
"bundled": true,
"requires": {
"debuglog": "^1.0.1",
"graceful-fs": "^4.1.2",
"read-package-json": "^2.0.0",
"readdir-scoped-modules": "^1.0.0",
"semver": "2 || 3 || 4 || 5",
"slide": "~1.1.3",
"util-extend": "^1.0.1"
"debuglog": "1.0.1",
"graceful-fs": "4.1.6",
"read-package-json": "2.0.4",
"readdir-scoped-modules": "1.0.2",
"semver": "5.1.0",
"slide": "1.1.6",
"util-extend": "1.0.1"
},
"dependencies": {
"debuglog": {
......@@ -7216,10 +7211,10 @@
"version": "1.0.2",
"bundled": true,
"requires": {
"debuglog": "^1.0.1",
"dezalgo": "^1.0.0",
"graceful-fs": "^4.1.2",
"once": "^1.3.0"
"debuglog": "1.0.1",
"dezalgo": "1.0.3",
"graceful-fs": "4.1.6",
"once": "1.4.0"
}
},
"util-extend": {
......@@ -7817,9 +7812,9 @@
"version": "2.2.1",
"bundled": true,
"requires": {
"block-stream": "*",
"fstream": "^1.0.2",
"inherits": "2"
"block-stream": "0.0.9",
"fstream": "1.0.10",
"inherits": "2.0.3"
}
},
"text-table": {
......@@ -7899,9 +7894,9 @@
"version": "1.1.4",
"bundled": true,
"requires": {
"graceful-fs": "^4.1.2",
"imurmurhash": "^0.1.4",
"slide": "^1.1.5"
"graceful-fs": "4.1.6",
"imurmurhash": "0.1.4",
"slide": "1.1.6"
}
}
}
......@@ -10467,6 +10462,11 @@
}
}
},
"videogular2": {
"version": "6.0.1",
"resolved": "http://r.cnpmjs.org/videogular2/download/videogular2-6.0.1.tgz",
"integrity": "sha1-RhpPj2M9yiSUOATUSRCXKZneeZo="
},
"vlq": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
......
......@@ -33,7 +33,6 @@
"@ionic-native/mobile-accessibility": "^4.20.0",
"@ionic-native/splash-screen": "^4.20.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic-native/video-player": "^4.20.0",
"@ionic/storage": "2.1.3",
"cordova": "^6.5.0",
"cordova-android": "7.0.0",
......@@ -59,6 +58,7 @@
"rxjs": "^5.5.12",
"sw-toolbox": "3.6.0",
"vconsole": "^3.3.0",
"videogular2": "^6.0.1",
"zone.js": "0.8.18"
},
"devDependencies": {
......@@ -90,4 +90,4 @@
"android"
]
}
}
\ No newline at end of file
}
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="310" android:versionName="0.3.10" package="io.ionic.partyCloud.starter.test" xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:hardwareAccelerated="true" android:versionCode="311" android:versionName="0.3.11" package="io.ionic.partyCloud.starter.test" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<application android:hardwareAccelerated="true" android:icon="@mipmap/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
......
<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.partyCloud.starter.test" version="0.3.10" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="io.ionic.partyCloud.starter.test" version="0.3.11" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<feature name="Keyboard">
<param name="android-package" onload="true" value="io.ionic.keyboard.IonicKeyboard" />
</feature>
......
......@@ -42,7 +42,6 @@ import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
import {Camera} from "@ionic-native/camera";
import {ProposalPageModule} from "../pages/mine-pages/proposal/proposal.module";
import {MineService} from "../pages/mine-pages/mine.service";
import {VideoPlayer} from "@ionic-native/video-player";
@NgModule({
declarations: [
......@@ -101,7 +100,6 @@ import {VideoPlayer} from "@ionic-native/video-player";
MobileAccessibility,
Camera,
Geolocation,
VideoPlayer,
DatePipe,
LearnService,
LearnManageService,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -5,6 +5,8 @@ import {ReplyComponent} from './reply/reply';
import {CommentComponent} from './comment/comment';
import {SwiperComponent} from './swiper/swiper';
import {EducationComponent} from './education/education';
import {VideoiComponent} from './videoi/videoi';
import { VideoListComponent } from './video-list/video-list';
@NgModule({
declarations: [
......@@ -12,18 +14,21 @@ import {EducationComponent} from './education/education';
ReplyComponent,
CommentComponent,
SwiperComponent,
EducationComponent
EducationComponent,
VideoiComponent,
VideoListComponent
],
imports: [
IonicPageModule,
],
exports: [
SlideListComponent,
ReplyComponent,
CommentComponent,
SwiperComponent,
EducationComponent
EducationComponent,
VideoiComponent,
VideoListComponent
],
providers: [
SlideListComponent,
......
......@@ -2,56 +2,59 @@
<html lang="zh" dir="ltr">
<head>
<meta charset="UTF-8">
<title>部机关党建云平台</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<!-- <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> -->
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<!--<script src="http://webapi.amap.com/maps?v=1.3&key=4ad6cba9ebd3b7b002919cf6ef8d2fd1"></script>-->
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="stylesheet" href="assets/swiper/swiper-4.1.6.min.css">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
<meta charset="UTF-8">
<title>部机关党建云平台</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<!-- <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> -->
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<!--<script src="http://webapi.amap.com/maps?v=1.3&key=4ad6cba9ebd3b7b002919cf6ef8d2fd1"></script>-->
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
<link rel="stylesheet" href="assets/swiper/swiper-4.1.6.min.css">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>
<!-- un-comment this code to enable service worker
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>-->
<link href="build/main.css" rel="stylesheet">
</head>
<body>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- Ionic's root component and where the app will load -->
<ion-app></ion-app>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The polyfills js is generated during the build process -->
<script src="build/polyfills.js"></script>
<!-- The vendor js is generated during the build process
It contains all of the dependencies in node_modules -->
<script src="build/vendor.js"></script>
<!-- The vendor js is generated during the build process
It contains all of the dependencies in node_modules -->
<script src="build/vendor.js"></script>
<!-- The main bundle js is generated during the build process -->
<script src="build/main.js"></script>
<!-- The main bundle js is generated during the build process -->
<script src="build/main.js"></script>
</body>
<script src="assets/swiper/swiper-4.1.6.min.js"></script>
<script src="assets/jwplayer/jwplayer.js"></script>
<script src="assets/jwplayer/jwpsrv.js"></script>
<script src="assets/jwplayer/jwplayer.html5.js"></script>
</html>
\ No newline at end of file
</html>
<ion-header>
<ion-navbar>
<ion-title></ion-title>
</ion-navbar>
<ion-navbar>
<ion-title></ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div class="stuff">
<div class="stuff-container">
<div class="stuff-title">
{{stuffObj?.title}}
</div>
<div class="stuff-info">
<span class="info-publisher">{{stuffObj?.source}}</span>
<span class="info-time">{{stuffObj?.publishTime | date:'yyyy-MM-dd'}}</span>
</div>
<div class="stuff-content">
<p [innerHTML]="stuffObj?.content"></p>
</div>
<div class="stuff-attachments">
<ng-container *ngFor="let item of attachments">
<!-- <div style="height: 160px;" *ngIf="item.resourceType == 1">-->
<!-- <img style="height: 160px;" [src]="url + item.path" alt="">-->
<!-- </div>-->
<div *ngIf="item.resourceType == 3">
<video width="100%" height="100%" [src]="url + item.path+ '#t=0.1' " controls="controls" preload="metadata">
您的浏览器不支持 html5。
</video>
<div class="stuff">
<div class="stuff-container">
<div class="stuff-title">
{{stuffObj?.title}}
</div>
</ng-container>
<ng-container *ngFor="let item of attachments">
</ng-container>
</div>
</div>
<div class="stuff-comment">
<p class="comment-title">评论</p>
<div *ngFor="let comment of stuffObj?.commentInfos" class="comment-item">
<ion-row>
<ion-col col-2>
<ng-container *ngIf="comment?.picUrl && comment?.picUrl != ''">
<img src="{{picture+comment.picUrl}}" class="contact-img">
</ng-container>
<ng-container *ngIf="!comment?.picUrl || comment?.picUrl == ''">
<img src="./assets/imgs/man.png" class="contact-img" *ngIf="comment.userGender =='1'||comment.userGender==null">
<img src="./assets/imgs/woman.png" class="contact-img" *ngIf="comment.userGender =='0'">
</ng-container>
</ion-col>
<ion-col col-10 style="border-bottom: 1px solid #eee;">
<p class="comment-info">
{{comment.username}}
</p>
<p class="commnet-content">
{{comment.content}}
</p>
<p class="comment-time">
{{comment.createTime | date:'yyyy-MM-dd'}} <span>·</span>
<span class="repear" (click)="openMask(comment)">回复</span>
<span *ngIf="comment.replyNum > 0" class="repear" (click)="commentSearch(comment)">查看回复({{comment.replyNum}})</span>
</p>
</ion-col>
</ion-row>
</div>
<div class="stuff-info">
<span class="info-publisher">{{stuffObj?.source}}</span>
<span class="info-time">{{stuffObj?.publishTime | date:'yyyy-MM-dd'}}</span>
</div>
<div class="stuff-content">
<p [innerHTML]="stuffObj?.content"></p>
</div>
<div class="stuff-attachments">
<ng-container *ngFor="let item of attachments">
<div *ngIf="item.resourceType == 3">
<videoi [inputValue]="url + item.path+ '#t=0.1'"></videoi>
</div>
</ng-container>
<ng-container *ngFor="let item of attachments">
</ng-container>
</div>
</div>
<div class="stuff-comment">
<p class="comment-title">评论</p>
<div *ngFor="let comment of stuffObj?.commentInfos" class="comment-item">
<ion-row>
<ion-col col-2>
<ng-container *ngIf="comment?.picUrl && comment?.picUrl != ''">
<img src="{{picture+comment.picUrl}}" class="contact-img">
</ng-container>
<ng-container *ngIf="!comment?.picUrl || comment?.picUrl == ''">
<img src="./assets/imgs/man.png" class="contact-img"
*ngIf="comment.userGender =='1'||comment.userGender==null">
<img src="./assets/imgs/woman.png" class="contact-img" *ngIf="comment.userGender =='0'">
</ng-container>
</ion-col>
<ion-col col-10 style="border-bottom: 1px solid #eee;">
<p class="comment-info">
{{comment.username}}
</p>
<p class="commnet-content">
{{comment.content}}
</p>
<p class="comment-time">
{{comment.createTime | date:'yyyy-MM-dd'}} <span>·</span>
<span class="repear" (click)="openMask(comment)">回复</span>
<span *ngIf="comment.replyNum > 0" class="repear"
(click)="commentSearch(comment)">查看回复({{comment.replyNum}})</span>
</p>
</ion-col>
</ion-row>
</div>
</div>
</div>
</div>
</ion-content>
<div *ngIf="footerView" class="stuff-footer">
<ion-row>
<ion-col col-6>
<div class="input" (click)="openComment()">欢迎发表你的观点</div>
</ion-col>
<ion-col col-2>
<ion-icon name="chatboxes"></ion-icon>
<span class="tip-num">{{countObj?.commentCount}}</span>
</ion-col>
<ion-col col-2 (click)="collectionHandle()">
<ion-icon #collection [ngClass]="countObj?.collection == true?'main-color':''" name="heart"></ion-icon>
<span class="tip-num">{{countObj?.collectionCount}}</span>
</ion-col>
<ion-col col-2 (click)="likeHandle()">
<ion-icon #like [ngClass]="countObj?.like == true?'main-color':''" name="thumbs-up"></ion-icon>
<span class="tip-num">{{countObj?.likeCount}}</span>
</ion-col>
</ion-row>
</div>
<div class="error-text" *ngIf="reply">
<div class="error-flex">
<div class="padding-10">
<textarea [(ngModel)]="replyContent" class="content-textarea" placeholder="{{replyText}}"></textarea>
</div>
<div class="error-footer">
<ion-row>
<ion-row>
<ion-col col-6>
<button (click)="replyHandle()" class="sure">发布</button>
<div class="input" (click)="openComment()">欢迎发表你的观点</div>
</ion-col>
<ion-col col-6>
<button (click)="cancel()" class="cancel">取消</button>
<ion-col col-2>
<ion-icon name="chatboxes"></ion-icon>
<span class="tip-num">{{countObj?.commentCount}}</span>
</ion-col>
<ion-col col-2 (click)="collectionHandle()">
<ion-icon #collection [ngClass]="countObj?.collection == true?'main-color':''" name="heart"></ion-icon>
<span class="tip-num">{{countObj?.collectionCount}}</span>
</ion-col>
<ion-col col-2 (click)="likeHandle()">
<ion-icon #like [ngClass]="countObj?.like == true?'main-color':''" name="thumbs-up"></ion-icon>
<span class="tip-num">{{countObj?.likeCount}}</span>
</ion-col>
</ion-row>
</ion-row>
</div>
<div class="error-text" *ngIf="reply">
<div class="error-flex">
<div class="padding-10">
<textarea [(ngModel)]="replyContent" class="content-textarea" placeholder="{{replyText}}"></textarea>
</div>
<div class="error-footer">
<ion-row>
<ion-col col-6>
<button (click)="replyHandle()" class="sure">发布</button>
</ion-col>
<ion-col col-6>
<button (click)="cancel()" class="cancel">取消</button>
</ion-col>
</ion-row>
</div>
</div>
</div>
</div>
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { StuffDetailPage } from './stuff-detail';
import {ComponentsModule} from "../../../components/components.module";
@NgModule({
declarations: [
StuffDetailPage,
],
imports: [
IonicPageModule.forChild(StuffDetailPage),
],
imports: [
IonicPageModule.forChild(StuffDetailPage),
ComponentsModule,
],
})
export class StuffDetailPageModule {}
......@@ -93,8 +93,8 @@
<div class="swiper-slide">
<ion-content>
<div class="search-content">
<ng-container *ngFor="let item of new">
<div *ngIf="obj.childrenName != '你问我答'" class="search-item" (click)="goToDetail(item)">
<ng-container *ngFor="let item of new;">
<div *ngIf="obj.childrenName != '你问我答'" class="search-item" (click)="goToDetail(item)" >
<p class="item-info">
<span class="item-source">{{item.source}}</span>
<span>{{item.publishTime | date:'yyyy-MM-dd'}}</span>
......@@ -132,8 +132,8 @@
<ion-icon *ngIf="new.topTime"
class="icon-fire iconfont"></ion-icon>
</p>
<div (click)="clickVideo($event)">
<video width="100%" height="100%"
<div>
<video width="100%" height="100%" (play)="clickVideo($event)"
controls="controls" preload="metadata" muted="muted">
<source [src]="picture +item.path+ '#t=0.1' ">
您的浏览器不支持 html5。
......
import {Component, ElementRef, NgZone, Renderer2, ViewChild} from '@angular/core';
import {Component, ElementRef, HostListener, NgZone, Renderer2, ViewChild} from '@angular/core';
import {Content, InfiniteScrollContent, IonicPage, NavController, NavParams, Slide, Slides} from 'ionic-angular';
import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {TabsService} from "../tabs.service";
......@@ -516,7 +516,6 @@ export class DiscoverPage {
)
}
//前往搜索页面
goToSearch() {
this.navCtrl.push(SearchNewPage);
......@@ -558,7 +557,15 @@ export class DiscoverPage {
this.navCtrl.push('SelectTypePage', {type: 'issue'});
}
//列表视频不同时播放
clickVideo(e) {
console.log(e);
const videoArr = document.querySelectorAll("video");
for (let i = 0; i < videoArr.length; i++) {
if (videoArr[i] != e.target) {
videoArr[i].pause();
}
}
}
}
......@@ -3,18 +3,13 @@ import {NavController, IonicPage, Slides, Content, InfiniteScrollContent, FabLis
import {Http, Response} from '@angular/http';
import {AppService, AppGlobal} from '../../../service/http.service';
import {Storage} from '@ionic/storage';
import {NoticePage} from "../notice/notice";
import {Badge} from '@ionic-native/badge';
import {TabsService} from "../tabs.service";
import {CommonService} from "../../../provide/common.service";
import {SearchNewPage} from "../../home-pages/search-new/search-new";
import {StuffDetailPage} from "../../home-pages/stuff-detail/stuff-detail";
import {EmitService} from "../../../provide/emit.service";
import {DatePipe} from "@angular/common";
import {SlideListComponent} from "../../../components/slide-list/slide-list";
import {interval} from "rxjs/observable/interval";
import {SwiperComponent} from "../../../components/swiper/swiper";
import {VideoPlayer} from "@ionic-native/video-player";
declare let Swiper: any;
......@@ -90,7 +85,6 @@ export class HomePage {
public commonSer: CommonService, public emitSer: EmitService,
public zone: NgZone, public tabSer: TabsService,
public renderer: Renderer2,
private swiper: SwiperComponent, private videoPlayer: VideoPlayer,
public appService: AppService, public http: Http, public storage: Storage,
public badge: Badge, public tabsSer: TabsService) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment